OpenAPI Specification
openapi: 3.0.0
info:
title: API Endpoints administrations companies API
description: This page allows you to explore the available API endpoints. Select a resource (e.g. debtors) and an endpoint (e.g. /v1/debtors) to inspect an example response and available parameters. An authorization header containing a Bearer token is required, see [Authentication](/authentication/authorization).
version: 1.0.0
servers:
- url: https://api.paytsoftware.com
description: Production
- url: https://demo-api.paytsoftware.com
description: Demo / testing
security:
- bearerAuth: []
tags:
- name: companies
description: Operations about companies
paths:
/v1/companies:
get:
summary: Get companies connected to your application
description: '**NOTE:** This endpoint uses [Basic authentication](https://docs.paytsoftware.com/authentication/basic-authorization).
Returns a list of all companies with an active connection to your application.'
parameters:
- in: query
name: fields
description: 'JSON object defining fields to receive (e.g {"only": ["field1", {"field2": ["field3"]}]})'
required: false
schema:
type: string
- in: query
name: cursor
description: The record identifier after which to start the page
required: false
schema:
type: string
- in: query
name: per_page
description: How many records will be returned per page, (1..500), defaults to 100
required: false
schema:
type: integer
format: int32
minimum: 1
maximum: 500
default: 100
responses:
'200':
description: Paginated list of companies
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerApi_CompaniesPageEntity'
'401':
description: Not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerApi_ErrorEntity'
'403':
description: Access not authorized
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerApi_ErrorEntity'
tags:
- companies
operationId: getV1Companies
/v1/companies/{id}:
get:
summary: Get company by id
description: '**NOTE:** This endpoint uses [Basic authentication](https://docs.paytsoftware.com/authentication/basic-authorization).
Get company by id.'
parameters:
- in: path
name: id
description: Company identifier
required: true
schema:
type: string
responses:
'200':
description: Company
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerApi_V1_CompanyEntity'
'401':
description: Not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerApi_ErrorEntity'
'403':
description: Access not authorized
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerApi_ErrorEntity'
tags:
- companies
operationId: getV1CompaniesId
components:
schemas:
CustomerApi_PaginationEntity:
type: object
properties:
cursor:
type: string
description: Cursor for fetching the next page
required:
- cursor
CustomerApi_CompaniesPageEntity:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/CustomerApi_V1_CompanyEntity'
description: Company
pagination:
allOf:
- $ref: '#/components/schemas/CustomerApi_PaginationEntity'
description: Pagination details
required:
- data
description: CustomerApi_CompaniesPageEntity model
CustomerApi_ErrorEntity:
type: object
properties:
code:
type: string
description: Error code
message:
type: string
description: Error message
required:
- code
- message
description: CustomerApi_ErrorEntity model
CustomerApi_V1_CompanyEntity:
type: object
properties:
id:
type: string
description: Unique identifier
name:
type: string
description: Name
status:
type: string
enum:
- active
- implementation
- inactive
- deleted
- unconfirmed
description: Status
trial_ends_on:
type: string
description: The date at which the trial ends
trial:
type: boolean
description: Whether the Company is still in the trial period.
required:
- id
- name
- status
- trial_ends_on
- trial
description: CustomerApi_V1_CompanyEntity model
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: OAuth2 access token or static API token. See [Authorization](/authentication/authorization) for how to obtain one.