Company Document Types

Create Company Document Type

Declare that the company can receive a document type, under a given process.

POST
/api/v1/companies/{companyId}/document-types

Declare that the company can receive a document type, under a given process. When the company is registered as an SMP recipient, the document type is published in the SMP, which is what lets senders address it. A company created without skipDefaultCompanySetup already has the default document types for its country; use this to accept something beyond them, and only for document types you can actually process.

Authorization

AuthorizationBasic <token>

Basic API key authentication. Create a new API key and secret in the Recommand dashboard.

In: header

Path Parameters

companyId*string

The ID of the company to create a document type for

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/companies/string/document-types" \  -H "Content-Type: application/json" \  -d '{    "docTypeId": "string",    "processId": "string"  }'
{  "success": true,  "documentType": {    "id": "cdt_01JQZ8X0M4T7RB6K9V2NDHW3PA",    "companyId": "c_01JQZ8X0M4T7RB6K9V2NDHW3PA",    "docTypeId": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1",    "processId": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}