Skip to content

Create a Department

Request

Create a Department based on the provided details.

Security
api_key
Headers
x-managed-company-idstringrequired

The ID of the managed company on behalf of which the request is made

Bodyapplication/jsonrequired
identificationNumberstring
namestringrequired
headAddressobject(PhysicalAddressDto)required
emailAddressstring, (email)
phoneNumberstring
hasSeparateInvoicingbooleanrequired
isActivebooleanrequired
curl -i -X POST \
  https://doc.acc.connect.easypost.eu/_mock/public-api/openapi/departments \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-managed-company-id: string' \
  -d '{
    "identificationNumber": "string",
    "name": "string",
    "headAddress": {
      "street": "string",
      "streetNr": "string",
      "postalCode": "string",
      "box": "string",
      "city": "string",
      "countryCode": "string",
      "addressAdditionalLine": "string"
    },
    "emailAddress": "user@example.com",
    "phoneNumber": "string",
    "hasSeparateInvoicing": true,
    "isActive": true
  }'

Responses

Bodyapplication/json
companyIdstringrequired

Unique identifier of the department parent company

erpIdstringrequired

ERP identifier of the department

idstringrequired

Unique identifier of the department

identificationNumberstring

Identification number of the department

namestringrequired

Name of the department

headAddressobject(PhysicalAddressDto)required

Head office address of the department

emailAddressstring, (email)

Email address of the department

phoneNumberstring

Phone number of the department

hasSeparateInvoicingbooleanrequired

Indicates if the department has separate invoicing

isActivebooleanrequired

Indicates if the department is active

createdAtstringrequired

Creation date of the department

lastModifiedAtstringrequired

Last modification date of the department

lastModifiedBystringrequired

Last modified by information

Response
{ "companyId": "string", "erpId": "string", "id": "string", "identificationNumber": "string", "name": "string", "headAddress": { "street": "string", "streetNr": "string", "postalCode": "string", "box": "string", "city": "string", "countryCode": "string", "addressAdditionalLine": "string" }, "emailAddress": "user@example.com", "phoneNumber": "string", "hasSeparateInvoicing": true, "isActive": true, "createdAt": "string", "lastModifiedAt": "string", "lastModifiedBy": "string" }