acceptTransferRequest
mutation · in the family Inventory operations
What it does
Approve another location’s request to move stock — the sending side saying “yes, take it”.
The full.1 birth gates ride (source LF active +!= requesting; per line the source II [variant x source LF] active + stocked + junction-EXISTING; available >= q or CONFLICT/INSUFFICIENT_STOCK at location facility); a foreign source on a targeted request refuses named; cumulative over-allocation refuses CONFLICT/DISCREPANCY {lineNo, outstanding, supplied}. Returns both documents (TR-p). Requires the doc current revision + the unrestricted capability.
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Inventory operations — Receiving, counting, transferring and moving stock.
Roles that may call it:
- Owner
- Manager
- Associate Manager
- Warehouse Associate
- An API key whose scope allows
api:acceptTransferRequest
What happens
Reserves the stock at the sending location and starts the transfer paperwork.
Careful
Reserved stock stops being sellable at the sender until the transfer completes or is cancelled.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
input | AcceptTransferRequestInput AcceptTransferRequestInput! | yes | Accept-input for acceptTransferRequest: ONE acceptance = ONE linked Transfer born ready at the accepting source (a light pair births completed — the whole movement in the accept transaction). |
revision | ID ID! | yes | The revision id you read on the record; the change is refused if an edit landed in the meantime. |
reason | String | no |
Concurrency
Send the record’s current revision from your last read as revision. A stale revision is refused as CONFLICT/REVISION_STALE — read the record again and retry with the new value.
Returns
AcceptTransferRequestResult AcceptTransferRequestResult! — The acceptTransferRequest result: both touched documents.
Example request
mutation ExampleAcceptTransferRequest($input: AcceptTransferRequestInput!, $revision: ID!, $reason: String) {
acceptTransferRequest(input: $input, revision: $revision, reason: $reason) {
transferRequest {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
requestingOrganizationId
targetLogicalFacilityId
neededBy
priority
}
}
}Variables:
{
"input": {
"transferRequestId": "01900000-0000-7000-8000-735fcc6b0000",
"sourceLogicalFacilityId": "01900000-0000-7000-8000-280b436e0000",
"caption": "Blue jeans",
"lines": [
{
"lineNo": 1,
"quantity": "2"
}
]
},
"revision": "01900000-0000-7000-8000-b7960e180000",
"reason": "Correcting a miscount."
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"acceptTransferRequest": {
"transferRequest": {
"id": "01900000-0000-7000-8000-735fcc6b0000",
"sysId": "TR-EXMP-0000-000F",
"type": "TransferRequest",
"caption": "Blue jeans",
"status": "draft",
"parentId": "01900000-0000-7000-8000-10c08c590000",
"rootId": "01900000-0000-7000-8000-a1295a650000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 1,
"revision": "01900000-0000-7000-8000-53c6eea90000",
"requestingOrganizationId": "01900000-0000-7000-8000-fb3068010000",
"targetLogicalFacilityId": "01900000-0000-7000-8000-9cda417e0000",
"neededBy": "<needed by>",
"priority": "low"
}
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)CONFLICT/*— The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. (CONFLICT)VALIDATION/VERSION_REQUIRED— The request did not say which app version it came from. Retry: no. (VALIDATION)