Skip to content

Update a Department Based on ID

Request

Update a Department based on ID. It returns the updated Department.

Security
api_key
Path
idstringrequired

Unique identifier of the Department

Headers
x-managed-company-idstringrequired

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

Bodyapplication/jsonrequired
identificationNumberstring
namestring
headAddressobject(PhysicalAddressDto)
emailAddressstring, (email)
phoneNumberstring
hasSeparateInvoicingboolean
isActiveboolean
curl -i -X PATCH \
  'https://doc.acc.connect.easypost.eu/_mock/public-api/openapi/departments/{id}' \
  -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" }