コンテンツにスキップ

Update a transaction

Partially updates an existing transaction.

Only the fields you include are changed; pass items to replace the entire line-item list, or tx_time to change the transaction’s effective time (e.g. correct a shipment date). Provide revision to enforce optimistic concurrency. Type-specific rules from create still apply (tx_time is rejected on Adjust Stock). When to_location_id is omitted, the existing transaction’s to_location is preserved (memo-only / partial updates are supported).

PUThttps://rest.boxhero-app.com/v1/transactions/{tx_id}
Authorizationstring必須

Bearer <token> 形式の Bearer 認証ヘッダーです。<token> には APIトークン を指定します。

tx_idintegerminimum 0, maximum 2147483647必須
tx_timestringdate-time

New effective time of the transaction (ISO 8601 datetime string). Cannot be in the future. Not allowed on Adjust Stock. Omit to keep the existing transaction time. Moving the time into the past is rejected with tx-modify-too-old-tx-id when more than 5,000 of the team’s transactions would need recalculation.

from_location_idintegerminimum 0, maximum 2147483647

New source location. Only meaningful on Move Stock transactions.

to_location_idintegerminimum 0, maximum 2147483647

New destination location.

partner_idintegerminimum 0, maximum 2147483647, nullable

New counterparty. Pass null to clear an existing partner. Not allowed on Move Stock or Adjust Stock.

memostringmax length 2000

New memo. Pass an empty string to clear.

itemsarray of object

Replacement line items. When provided, the entire item list is replaced; must contain at least one entry.

プロパティを表示
item_idintegerminimum 0, maximum 2147483647

Item id. Mutually exclusive with item_sku.

item_skustringmin length 1, max length 255

Item SKU (case-insensitive). Mutually exclusive with item_id.

quantitynumber必須

Signed line quantity. Positive for Stock In and Move Stock; negative for Stock Out; signed for Adjust Stock.

revisionintegerminimum 0, maximum 9007199254740991

Latest revision you have observed. Omit to skip the concurrency check; pass the current value to refuse the update if another writer beat you to it.

200The updated transaction’s id.
idintegerminimum 0, maximum 2147483647必須

Id of the updated transaction.

400Request validation failed, the type-specific rules were violated, or the team is not in LOCATION mode.
idstring必須

Unique exception id (ex_ followed by 32 lowercase hex chars, no dashes — e.g. ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a). Quote this in support tickets so we can find the request in our logs.

typestring必須

Stable, machine-readable error code (RFC 7807-style URI fragment). Branch your error handling on this, not on title.

指定可能な値/errors/not-found/errors/invalid-request/errors/invalid-team-mode/errors/tokens/invalid/errors/tokens/required/errors/too-many-requests/errors/core/usage-limit-exceeded/errors/core/forbidden/errors/core/unhandled/errors/unhandled

titlestring必須

Human-readable summary of the error, in English.

correlationIDstring必須

Request correlation id (rq_ followed by 32 lowercase hex chars, no dashes — e.g. rq_01abf3...). Identical to the X-Correlation-Id response header. Pass an X-Correlation-Id request header to thread your trace through to ours.

instancestring必須

Pointer to the specific failing resource (e.g. /items/12345). Path-only, no /v1 version prefix.

codestring

Sub-reason code surfaced from upstream BoxHero core (on core-mapped 4xx) or from the gateway itself (e.g. not-available-for-api-token on 403). Use this for fine-grained branching after dispatching on type.

errorsarray of object

Field-level error details. Present on /errors/invalid-request (400) responses. Each entry locates a single failure via JSONPath-like path segments and a human-readable message.

プロパティを表示
patharray of string | number必須
messagestring必須
401Missing or invalid API token.
idstring必須

Unique exception id (ex_ followed by 32 lowercase hex chars, no dashes — e.g. ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a). Quote this in support tickets so we can find the request in our logs.

typestring必須

Stable, machine-readable error code (RFC 7807-style URI fragment). Branch your error handling on this, not on title.

指定可能な値/errors/not-found/errors/invalid-request/errors/invalid-team-mode/errors/tokens/invalid/errors/tokens/required/errors/too-many-requests/errors/core/usage-limit-exceeded/errors/core/forbidden/errors/core/unhandled/errors/unhandled

titlestring必須

Human-readable summary of the error, in English.

correlationIDstring必須

Request correlation id (rq_ followed by 32 lowercase hex chars, no dashes — e.g. rq_01abf3...). Identical to the X-Correlation-Id response header. Pass an X-Correlation-Id request header to thread your trace through to ours.

instancestring必須

Pointer to the specific failing resource (e.g. /items/12345). Path-only, no /v1 version prefix.

codestring

Sub-reason code surfaced from upstream BoxHero core (on core-mapped 4xx) or from the gateway itself (e.g. not-available-for-api-token on 403). Use this for fine-grained branching after dispatching on type.

errorsarray of object

Field-level error details. Present on /errors/invalid-request (400) responses. Each entry locates a single failure via JSONPath-like path segments and a human-readable message.

プロパティを表示
patharray of string | number必須
messagestring必須
403/errors/invalid-request (HTTP 403) from core, distinguished by code: invalid-quantity-tx-type-in/invalid-quantity-tx-type-out when a line quantity has the wrong sign (positive for Stock In and Move Stock, negative for Stock Out), tx-modify-revision-mismatch when the supplied revision is stale (refetch the latest transaction and retry), tx-invalid-param-tx-time-is-future when tx_time is in the future, or tx-modify-too-old-tx-id when the edit would require recalculating more than the team’s 5,000 most recent transactions (editing very old transactions — including moving tx_time far into the past — is rejected for performance).
idstring必須

Unique exception id (ex_ followed by 32 lowercase hex chars, no dashes — e.g. ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a). Quote this in support tickets so we can find the request in our logs.

typestring必須

Stable, machine-readable error code (RFC 7807-style URI fragment). Branch your error handling on this, not on title.

指定可能な値/errors/not-found/errors/invalid-request/errors/invalid-team-mode/errors/tokens/invalid/errors/tokens/required/errors/too-many-requests/errors/core/usage-limit-exceeded/errors/core/forbidden/errors/core/unhandled/errors/unhandled

titlestring必須

Human-readable summary of the error, in English.

correlationIDstring必須

Request correlation id (rq_ followed by 32 lowercase hex chars, no dashes — e.g. rq_01abf3...). Identical to the X-Correlation-Id response header. Pass an X-Correlation-Id request header to thread your trace through to ours.

instancestring必須

Pointer to the specific failing resource (e.g. /items/12345). Path-only, no /v1 version prefix.

codestring

Sub-reason code surfaced from upstream BoxHero core (on core-mapped 4xx) or from the gateway itself (e.g. not-available-for-api-token on 403). Use this for fine-grained branching after dispatching on type.

errorsarray of object

Field-level error details. Present on /errors/invalid-request (400) responses. Each entry locates a single failure via JSONPath-like path segments and a human-readable message.

プロパティを表示
patharray of string | number必須
messagestring必須
404No transaction with the given id was found in this team, or it was already deleted.
idstring必須

Unique exception id (ex_ followed by 32 lowercase hex chars, no dashes — e.g. ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a). Quote this in support tickets so we can find the request in our logs.

typestring必須

Stable, machine-readable error code (RFC 7807-style URI fragment). Branch your error handling on this, not on title.

指定可能な値/errors/not-found/errors/invalid-request/errors/invalid-team-mode/errors/tokens/invalid/errors/tokens/required/errors/too-many-requests/errors/core/usage-limit-exceeded/errors/core/forbidden/errors/core/unhandled/errors/unhandled

titlestring必須

Human-readable summary of the error, in English.

correlationIDstring必須

Request correlation id (rq_ followed by 32 lowercase hex chars, no dashes — e.g. rq_01abf3...). Identical to the X-Correlation-Id response header. Pass an X-Correlation-Id request header to thread your trace through to ours.

instancestring必須

Pointer to the specific failing resource (e.g. /items/12345). Path-only, no /v1 version prefix.

codestring

Sub-reason code surfaced from upstream BoxHero core (on core-mapped 4xx) or from the gateway itself (e.g. not-available-for-api-token on 403). Use this for fine-grained branching after dispatching on type.

errorsarray of object

Field-level error details. Present on /errors/invalid-request (400) responses. Each entry locates a single failure via JSONPath-like path segments and a human-readable message.

プロパティを表示
patharray of string | number必須
messagestring必須
429Rate limit exceeded. Check RateLimit, Retry-After, and X-RateLimit-* response headers before retrying.
idstring必須

Unique exception id (ex_ followed by 32 lowercase hex chars, no dashes — e.g. ex_8f5c0c8e0e0a4a3c9b3f4f2c4f6c8d2a). Quote this in support tickets so we can find the request in our logs.

typestring必須

Stable, machine-readable error code (RFC 7807-style URI fragment). Branch your error handling on this, not on title.

指定可能な値/errors/not-found/errors/invalid-request/errors/invalid-team-mode/errors/tokens/invalid/errors/tokens/required/errors/too-many-requests/errors/core/usage-limit-exceeded/errors/core/forbidden/errors/core/unhandled/errors/unhandled

titlestring必須

Human-readable summary of the error, in English.

correlationIDstring必須

Request correlation id (rq_ followed by 32 lowercase hex chars, no dashes — e.g. rq_01abf3...). Identical to the X-Correlation-Id response header. Pass an X-Correlation-Id request header to thread your trace through to ours.

instancestring必須

Pointer to the specific failing resource (e.g. /items/12345). Path-only, no /v1 version prefix.

codestring

Sub-reason code surfaced from upstream BoxHero core (on core-mapped 4xx) or from the gateway itself (e.g. not-available-for-api-token on 403). Use this for fine-grained branching after dispatching on type.

errorsarray of object

Field-level error details. Present on /errors/invalid-request (400) responses. Each entry locates a single failure via JSONPath-like path segments and a human-readable message.

プロパティを表示
patharray of string | number必須
messagestring必須

リクエスト

Terminal window
curl --request PUT \
--url 'https://rest.boxhero-app.com/v1/transactions/{tx_id}' \
--header "Authorization: Bearer $BOXHERO_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"tx_time": "2026-01-16T11:00:00.000Z",
"to_location_id": 47043,
"from_location_id": 47041,
"partner_id": 431485,
"items": [
{
"item_id": 14290445,
"quantity": 2
}
],
"memo": "Updated memo.",
"revision": 1
}'

レスポンス

{
"id": 14012345
}