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.
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.
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:
|
If-Match | string weak Etag as optimistic locking check |
OK
Created successfully
The entity is not found
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.
General error payload
{- "business_id": "624ec196-4c5c-4fb4-bb43-9ffd8a6b8844",
- "name": "a name"
}
{- "business_id": "624ec196-4c5c-4fb4-bb43-9ffd8a6b8844",
- "name": "a name"
}
This endpoint allows you to delete a given company
Deletion has succeeded and body is empty
The entity is not found
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.
General error payload
{- "title": "Invalid ...",
- "status": 400,
- "detail": "string",
- "instance": "an URI",
- "violations": [
- {
- "field": "class.field",
- "message": "a violation message"
}
]
}