Skip to content
トレカクラウド
Esc
↑↓navigate↵open⌘Jpreview

Return transferred units to origin

Returns in-transit units to the shelves they left. Omitting inventoryItemIds returns all in-transit lines. Received lines cannot be returned this way. In addition to inventory:read, this needs its operation scope and the approving member’s inventory.write permission.

POST/inventory/transfers/{id}/return
Authorization
AuthorizationOAuth2 access token · headerrequired

Authorization code flow (PKCE S256 required). Send resource=https://api.toreca-cloud.com/partner/v1 with the authorization, token and refresh requests. Access tokens last 15 minutes; refresh tokens last 90 days and rotate on every refresh.

Scopes:inventory:readinventory:move
Path parameters
idstring<uuid>required
Request body
requiredapplication/json
reasonstringrequired
min length 1 · max length 2000
inventoryItemIdsstring<uuid>[]
min items 1 · max items 200
Responses
200

Success

idstring<uuid>required
createdAtstring<date-time>required
updatedAtstring<date-time>required
transferNumberstringrequired
statusstringrequired
Allowed:in_transitcompletedcancelled
versionintegerrequired
fromSiteIdstring<uuid>required
toSiteIdstring<uuid>required
carrierstring | nullrequired
Show properties
One of:
string
string
null
null
trackingNumberstring | nullrequired
Show properties
One of:
string
string
null
null
reasonstringrequired
externalRefstring | nullrequired
Show properties
One of:
string
string
null
null
shippedAtstring<date-time>required
completedAtstring<date-time> | nullrequired
Show properties
One of:
string<date-time>
string<date-time>
null
null
itemsobject[]required
Show properties
Array of object
inventoryItemIdstring<uuid>required
assetNumberstringrequired
statusstringrequired
Allowed:in_transitreceivedreturned
fromLocationIdstring<uuid>required
toLocationIdstring<uuid> | nullrequired
Show properties
One of:
string<uuid>
string<uuid>
null
null
resolvedAtstring<date-time> | nullrequired
Show properties
One of:
string<date-time>
string<date-time>
null
null
400

invalid_request: a parameter is invalid.

errorstringrequired

The error code

scopestring

With insufficient_scope, the missing scope

requestIdstring<uuid>
inventoryItemIdsstring<uuid>[]
holdIdsstring<uuid>[]
commitmentIdsstring<uuid>[]
401

invalid_token: the token is missing, expired, or for another resource.

errorstringrequired

The error code

scopestring

With insufficient_scope, the missing scope

requestIdstring<uuid>
inventoryItemIdsstring<uuid>[]
holdIdsstring<uuid>[]
commitmentIdsstring<uuid>[]
403

One of insufficient_scope, connection_revoked, client_disabled or forbidden.

errorstringrequired

The error code

scopestring

With insufficient_scope, the missing scope

requestIdstring<uuid>
inventoryItemIdsstring<uuid>[]
holdIdsstring<uuid>[]
commitmentIdsstring<uuid>[]
404

not_found

errorstringrequired

The error code

scopestring

With insufficient_scope, the missing scope

requestIdstring<uuid>
inventoryItemIdsstring<uuid>[]
holdIdsstring<uuid>[]
commitmentIdsstring<uuid>[]
409

Conflict, reused requestId or receipt not confirmed

errorstringrequired

The error code

scopestring

With insufficient_scope, the missing scope

requestIdstring<uuid>
inventoryItemIdsstring<uuid>[]
holdIdsstring<uuid>[]
commitmentIdsstring<uuid>[]
422

The state, target or value refuses the operation. Inspect error and affected IDs.

errorstringrequired

The error code

scopestring

With insufficient_scope, the missing scope

requestIdstring<uuid>
inventoryItemIdsstring<uuid>[]
holdIdsstring<uuid>[]
commitmentIdsstring<uuid>[]
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.toreca-cloud.com/partner/v1/inventory/transfers/497f6eca-6276-4993-bfeb-53cbbbba6f08/return' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "reason": "string",
  "inventoryItemIds": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}'
Response
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "transferNumber": "string",
  "status": "in_transit",
  "version": 0,
  "fromSiteId": "33a55c88-1ae8-426c-bfdd-0fd03c0d6ee1",
  "toSiteId": "80101396-c399-408c-88ad-cd8029268567",
  "carrier": "string",
  "trackingNumber": "string",
  "reason": "string",
  "externalRef": "string",
  "shippedAt": "2019-08-24T14:15:22Z",
  "completedAt": "2019-08-24T14:15:22Z",
  "items": [
    {
      "inventoryItemId": "ef1bc09e-447a-46aa-a9d9-d86e3d490831",
      "assetNumber": "string",
      "status": "in_transit",
      "fromLocationId": "178bb398-90d2-4fc3-a4a0-37fc0eed2806",
      "toLocationId": "e81ad314-9cb9-45ae-9ad9-f1b5ebcc7aae",
      "resolvedAt": "2019-08-24T14:15:22Z"
    }
  ]
}

Was this page helpful?