OpenAPI Specification
openapi: 3.0.0
info:
title: API Endpoints administrations vat_rates 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: vat_rates
description: Operations about vat_rates
paths:
/v1/vat_rates:
post:
description: Create or update vat rates
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/postV1VatRates'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/postV1VatRates'
required: true
responses:
'201':
description: Vat rates 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:
- vat_rates
operationId: postV1VatRates
summary: Create or update vat rates
get:
description: Get administration vat rates
parameters:
- in: query
name: administration_id
description: Administration identifier
required: true
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 vat rates
content:
application/json:
schema:
$ref: '#/components/schemas/CustomerApi_VatRatesPageEntity'
'401':
description: Unauthorized
'403':
description: Forbidden
tags:
- vat_rates
operationId: getV1VatRates
summary: Get administration vat rates
components:
schemas:
CustomerApi_ErrorEntity:
type: object
properties:
code:
type: string
description: Error code
message:
type: string
description: Error message
required:
- code
- message
description: CustomerApi_ErrorEntity model
postV1VatRates:
type: object
properties:
administration_id:
type: string
description: Administration identifier
vat_rates:
type: array
items:
type: object
properties:
code:
type: string
description: Unique code to identify the vat rate
rate:
type: string
description: Vat rate in percentage, required on creation
name:
type: string
description: Name of the vat rate, required on creation
category:
type: string
description: Category of the vat rate
enum:
- regular
- zero
- none
- exempt
- reversed
- export
- export_within_eea
default: regular
required:
- administration_id
- vat_rates
description: Create or update vat rates
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_VatRatesPageEntity:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/CustomerApi_V1_VatRateEntity'
description: VAT rate
pagination:
allOf:
- $ref: '#/components/schemas/CustomerApi_PaginationEntity'
description: Pagination details
required:
- data
description: CustomerApi_VatRatesPageEntity model
CustomerApi_PaginationEntity:
type: object
properties:
cursor:
type: string
description: Cursor for fetching the next page
required:
- cursor
CustomerApi_V1_VatRateEntity:
type: object
properties:
id:
type: string
description: Internal identifier
administration_id:
type: string
description: Owning administration identifier
category:
type: string
enum:
- regular
- zero
- none
- exempt
- reversed
- export
- export_within_eea
description: Category
code:
type: string
description: Code
name:
type: string
description: Name
rate:
type: number
format: float
description: Rate
exemption_reason_code:
type: string
description: A code from the VATEX code list. This field is only relevant when creating UBLs and when the `category` is 'exempt'
required:
- id
- administration_id
- category
- code
- name
- rate
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: OAuth2 access token or static API token. See [Authorization](/authentication/authorization) for how to obtain one.