OpenAPI Specification
openapi: 3.0.0
info:
title: API Endpoints administrations debtors 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: debtors
description: Operations about debtors
paths:
/v1/debtors:
post:
description: Create or update administration debtors
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/postV1Debtors'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/postV1Debtors'
required: true
responses:
'201':
description: Debtors created
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerApi_SuccessEntity'
'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:
- debtors
operationId: postV1Debtors
summary: Create or update administration debtors
get:
description: Get administration debtors
parameters:
- in: query
name: administration_id
description: Administration identifier
required: true
schema:
type: string
- in: query
name: ids
description: Filter debtors with a comma separated list of internal ids
required: false
schema:
type: string
- in: query
name: debtor_numbers
description: Filter debtors with a comma separated list of debtor numbers
required: false
schema:
type: string
- in: query
name: debtor_identifiers
description: Filter debtors with a comma separated list of debtor identifiers from your accounting software
required: false
schema:
type: string
- in: query
name: updated_after
description: ISO8601 UTC Timestamp to filter records updated after it
required: false
schema:
type: string
format: date-time
- 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 debtors
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerApi_DebtorsPageEntity'
'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:
- debtors
operationId: getV1Debtors
summary: Get administration debtors
/v1/debtors/{id}:
get:
description: Get administration debtor by id
parameters:
- in: path
name: id
description: Debtor identifier
required: true
schema:
type: string
- in: query
name: administration_id
description: Administration identifier
required: true
schema:
type: string
- in: query
name: identifier_type
description: Type of debtor identifier to use (can be 'debtor_number', 'debtor_identifier' or left blank to use internal id)
required: false
schema:
type: string
- in: query
name: fields
description: 'JSON object defining fields to receive (e.g {"only": ["field1", {"field2": ["field3"]}]})'
required: false
schema:
type: string
responses:
'200':
description: Debtor
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerApi_V1_DebtorEntity'
'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:
- debtors
operationId: getV1DebtorsId
summary: Get administration debtor by id
components:
schemas:
CustomerApi_V1_LabelEntity:
type: object
properties:
name:
type: string
description: Label name
required:
- name
CustomerApi_DebtorsPageEntity:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/CustomerApi_V1_DebtorEntity'
description: Debtor
pagination:
allOf:
- $ref: '#/components/schemas/CustomerApi_PaginationEntity'
description: Pagination details
required:
- data
description: CustomerApi_DebtorsPageEntity 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_SuccessEntity:
type: object
properties:
success:
type: boolean
description: Request was handled successfully
count:
type: integer
format: int32
example: 98
description: Number of records processed, those without errors
errors:
type: object
example:
'123456':
- Validation error 1
- Validation error 2
'123461':
- Validation error
description: List of records that could not be processed and for which reasons
warnings:
type: object
example:
'123457':
- Warning message 1
- Warning message 2
description: List of records that were partially processed, the messages contain warnings
required:
- success
- count
- errors
description: CustomerApi_SuccessEntity model
CustomerApi_PaginationEntity:
type: object
properties:
cursor:
type: string
description: Cursor for fetching the next page
required:
- cursor
CustomerApi_V1_DebtorEntity:
type: object
properties:
book_open_amount:
type: string
description: Open amount in administration currency (request with the 'fields' parameter)
call_phone_number:
type: string
description: Phone number to call
coc_number:
type: string
description: CoC number
autogenerated_credit_limit_amount:
type: string
description: Credit limit amount based on payment behaviour (request with the 'fields' parameter, only available when creditworthiness monitoring with autogenerated credit limits is enabled)
credit_limit_amount:
type: string
description: Credit limit amount from the accounting package in administration currency
external_credit_limit_amount:
type: string
description: Credit limit amount based on GraydonCreditsafe (request with the 'fields' parameter, only available when creditworthiness monitoring is enabled)
external_credit_limit_currency_code:
type: string
description: Credit limit currency code based on GraydonCreditsafe (request with the 'fields' parameter, only available when creditworthiness monitoring is enabled)
debtor_provided_email_address:
type: string
description: Email address provided by debtor
debtor_number:
type: string
description: Debtor number
public_url:
type: string
description: Link to the debtor portal (request with the 'fields' parameter)
deeplink_url:
type: string
description: URL to the debtor in the debtor management interface (request with the 'fields' parameter)
primary_email_address:
type: string
description: Primary email address
invoice_bcc_email_address:
type: string
description: Invoice BCC email address
invoice_cc_email_address:
type: string
description: Invoice CC email address
invoice_email_address:
type: string
description: Invoice email address
internal_note_email_address:
type: string
description: Internal note email address (request with the 'fields' parameter)
labels:
type: array
items:
$ref: '#/components/schemas/CustomerApi_V1_LabelEntity'
description: Labels (request with the 'fields' parameter)
language_code:
type: string
description: Language used in communication
name:
type: string
description: Name
debtor_identifier:
type: string
description: Debtor identifier from accounting software
payment_behaviour:
type: integer
format: int32
description: Payment behaviour (request with the 'fields' parameter)
peppol_identifier:
type: string
description: Peppol identifier (request with the 'fields' parameter)
postal_address:
allOf:
- $ref: '#/components/schemas/CustomerApi_V1_AddressEntity'
description: Postal address
relation_manager:
type: string
description: Relation manager
remark:
type: string
description: Remark (request with the 'fields' parameter)
reminder_bcc_email_address:
type: string
description: Reminder BCC email address
reminder_cc_email_address:
type: string
description: Reminder CC email address
reminder_email_address:
type: string
description: Reminder email address
sms_phone_number:
type: string
description: Phone number to send SMS to
vat_number:
type: string
description: VAT number
peppol_enabled:
type: boolean
description: Debtor Peppol override (true/false). Null means fallback to administration setting (request with the 'fields' parameter)
administration_id:
type: string
description: Owning administration identifier
id:
type: string
description: Unique identifier
paused_at:
type: string
format: date-time
description: Timestamp at which the debtor was paused
reminding_paused_at:
type: string
format: date-time
description: Timestamp at which sending reminders for the debtor was paused
updated_at:
type: string
format: date-time
description: Timestamp at which the debtor was last updated
required:
- debtor_number
- name
- debtor_identifier
- postal_address
- administration_id
- id
- updated_at
description: CustomerApi_V1_DebtorEntity model
CustomerApi_V1_AddressEntity:
type: object
properties:
city:
type: string
description: City
country_code:
type: string
description: ISO 3166 Alpha-2 country code
postal_code:
type: string
description: Postal code
region:
type: string
description: Region
street_1:
type: string
description: Streetname and housenumber
street_2:
type: string
description: Additional address details
required:
- city
- country_code
postV1Debtors:
type: object
properties:
administration_id:
type: string
description: Administration identifier
debtors:
type: array
items:
type: object
properties:
debtor_number:
type: string
description: Unique code used to identify debtor
name:
type: string
description: Name of debtor
debtor_identifier:
type: string
description: Unique external identifier used to identify debtor
bank_account_name:
type: string
description: Name of bank account
bank_account_number:
type: string
description: Number of bank account
category:
type: string
description: Category of debtor
coc_number:
type: string
description: Chamber of commerce number of debtor
contact_identifier:
type: string
description: Unique external identifier used to identify contact
country_code:
type: string
description: ISO 3166 Alpha-2 country code of debtor
language_code:
type: string
description: Language code of debtor
oin_number:
type: string
description: OIN number of debtor
peppol_identifier:
type: string
description: Peppol identifier of debtor
relation_manager:
type: string
description: Relation manager of debtor
remark:
type: string
description: Remark
vat_number:
type: string
description: VAT number of debtor
is_company:
type: boolean
description: Whether debtor is a company
peppol_enabled:
type: boolean
description: Enable or disable Peppol for debtor. Use null to use administration setting
labels:
type: array
description: Labels of the debtor. Providing labels replaces all existing debtor labels; omitting labels leaves existing labels unchanged.
items:
type: string
required:
- debtor_number
- name
- debtor_identifier
required:
- administration_id
- debtors
description: Create or update administration debtors
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: OAuth2 access token or static API token. See [Authorization](/authentication/authorization) for how to obtain one.