Перейти к содержимому

Record an order's new packaging by its external id

POST
/api/v1/integration/orders/externalid/{externalId}/rebox
curl --request POST \
--url https://example.com/api/v1/integration/orders/externalid/example/rebox \
--header 'Content-Type: application/json' \
--data '{ "newPackaging": "example" }'
externalId
required
string
Media typeapplication/json

The packaging an order’s goods were repacked into.

object
newPackaging
required

Description of the new packaging. Optional; stored as sent.

null | string
Examplegenerated
{
"newPackaging": "example"
}

OK

Media typeapplication/json

One order, as the pull feed reports it.

object
id
required

The order’s id in PickUpper.

string format: uuid
externalId
required

The id the source system created the order under, or null for an order created in PickUpper.

null | string
shortId
required

The short human-readable code operators use to refer to the order.

string
status
required

Where the order stands, as a name: New, InPlanning, Planned, InProgress, FullyDelivered, PartiallyDelivered, Returned, Collected, PartiallyCollected, NotCollected, Refused, Cancelled or Closed. A Pickup or Return order ends Collected, PartiallyCollected or NotCollected where a Delivery order ends FullyDelivered, PartiallyDelivered or Returned; a Rebox order uses the delivery values and is FullyDelivered only when the new item was handed over and the old one collected. New values may be added: treat a value you do not know as not final.

Allowed values: New InPlanning Planned InProgress FullyDelivered PartiallyDelivered Returned Refused Cancelled Closed Collected PartiallyCollected NotCollected
miniStatus
required

The tenant’s own sub-status within the current status, by name, or null when none is set. It is a label the tenant configures, not part of the status machine.

null | string
type
required

What the order is for, as a name: Delivery, Pickup, Return or Rebox.

Allowed values: Delivery Pickup Return Rebox
customId
required

The reference the source system sent with the order, stored and returned unchanged.

null | string
createdAtUtc
required

When the order was created (UTC).

string format: date-time
updatedAtUtc
required

When the order last changed (UTC). This is the value the feed orders by and that the since parameter compares against.

string format: date-time
tags
required

The ids of the tags on the order, always an array. Resolve a tag id through the tag endpoints.

Array<string>
Example
{
"status": "New",
"type": "Delivery"
}

Validation failed

Media typeapplication/problem+json

The body of a 400 response, served as application/problem+json. It follows the RFC 9457 problem-details shape: type, title, status and detail are the standard members, and errors is an extension that lists the offending fields.

object
type
required

A stable, machine-readable code for the error. Branch on this rather than on the wording of the title or the detail.

string
title
required

A short label for the kind of failure, such as Validation failed.

string
status
required

The HTTP status code of the response, which for this body is 400.

integer format: int32
detail
required

A human-readable explanation of this particular failure, or null.

null | string
errors

The fields the request was rejected over, one entry each. Omitted entirely when the failure carries no field-level context, so a 400 can arrive without this member.

Array<object> | null

One field the request was rejected over.

object
field
required

The name of the offending field, spelled as the request body spells it.

string
code
required

A stable, machine-readable code for this field’s failure.

string
value
required

The rejected value. Always present, and null when it was not safe to echo back.

null | string
message
required

A human-readable explanation of what is wrong with the field.

string
overridable

Set only by the dispatcher application’s manual planning operations — integration endpoints never set it. True when every problem in this refusal is a tenant-policy refusal the operator may override by re-sending the same request with force: true. Omitted otherwise.

null | boolean
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"code": "example",
"value": "example",
"message": "example"
}
],
"overridable": true
}

Missing or invalid credentials

Authenticated, but the role or scope does not allow this

Not found

Media typeapplication/problem+json

RFC 9457 problem body returned on every failure. type carries a stable machine-readable error code (see docs/api/error-codes.yaml), title a short human summary, status the HTTP status, detail the specific message.

object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Conflict

Media typeapplication/problem+json

RFC 9457 problem body returned on every failure. type carries a stable machine-readable error code (see docs/api/error-codes.yaml), title a short human summary, status the HTTP status, detail the specific message.

object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Rate limit exceeded, or an Idempotency-Key request is still in flight; retry after the Retry-After header

Media typeapplication/problem+json

RFC 9457 problem body returned on every failure. type carries a stable machine-readable error code (see docs/api/error-codes.yaml), title a short human summary, status the HTTP status, detail the specific message.

object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Unexpected error

Media typeapplication/problem+json

RFC 9457 problem body returned on every failure. type carries a stable machine-readable error code (see docs/api/error-codes.yaml), title a short human summary, status the HTTP status, detail the specific message.

object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}