ReDoc documentation

Companies

Companies can be managed in Order Book and used as clients for Transport Requests. This allows you to target Conditionals to Orders contained within Transport Requests for select clients.

Get a Company with specified business id

Retrieve a single Company by its business id.

Securitykeycloak
Request
path Parameters
business_id
required
string

The business identifier of an entity instance

Responses
200

OK

404

The entity is not found

get/companies/{business_id}
Response samples
application/json
{
  • "business_id": "624ec196-4c5c-4fb4-bb43-9ffd8a6b8844",
  • "name": "a name"
}

Upsert a company by Id

This endpoint allows you to update (default behaviour) or insert a new Company. You are responsible to give a unique business identifier with your company. If this business identifier can't be found then a new company will be created. If a company with the given business identifier can be found then it will be updated.

When you specify 'if-match', which is filled in with a weak ETAG representing a version, then you can protect yourself from updates by someone else before committing your updates. (see also Optimistic locking). When such a conflict is detected, a 412 PreconditionFailed response is returned.

Securitykeycloak
Request
path Parameters
business_id
required
string

The business identifier of an entity instance

header Parameters
Prefer
Array of strings

The RFC7240 Prefer header indicates that a particular server behavior is preferred by the client but is not required for successful completion of the request (see RFC 7240).

The following behavior is supported by this API:

  • return=<minimal|representation> is used to suggest the server to return using status code 204 without a resource in the response body (minimal) or using status codes 200 or 201 with the resource in the response body on success (representation).
If-Match
string

weak Etag as optimistic locking check

Request Body schema: application/json
required
business_id
string

A unique reference ID

name
string

The name of this Company

Responses
200

OK

204

Created successfully

404

The entity is not found

412

Client error response code indicates that access to the target resource has been denied. This happens with conditional requests on methods other than GET or HEAD when the condition defined by the If-Unmodified-Since, If-Match or If-None-Match headers is not fulfilled. This is typically the case when the entity was updated by someone else before you commit your request. In that case, the request, usually a modification of a resource, cannot be executed and this error response is sent back.

default

General error payload

put/companies/{business_id}
Request samples
application/json
{
  • "business_id": "624ec196-4c5c-4fb4-bb43-9ffd8a6b8844",
  • "name": "a name"
}
Response samples
application/json
{
  • "business_id": "624ec196-4c5c-4fb4-bb43-9ffd8a6b8844",
  • "name": "a name"
}

Delete a company by Id

This endpoint allows you to delete a given company

Securitykeycloak
Request
path Parameters
business_id
required
string

The business identifier of an entity instance

header Parameters
If-Match
string

weak Etag as optimistic locking check

Responses
204

Deletion has succeeded and body is empty

404

The entity is not found

412

Client error response code indicates that access to the target resource has been denied. This happens with conditional requests on methods other than GET or HEAD when the condition defined by the If-Unmodified-Since, If-Match or If-None-Match headers is not fulfilled. This is typically the case when the entity was updated by someone else before you commit your request. In that case, the request, usually a modification of a resource, cannot be executed and this error response is sent back.

default

General error payload

delete/companies/{business_id}
Response samples
application/problem+json
{}