Skip to content
Stashtab Docs
Esc
↑↓navigate↵open⌘Jpreview

Correct a purchase-order declaration

PATCH/v1/organizations/{orgId}/purchase-orders/{purchaseOrderId}
Authorization
AuthorizationBasic auth · headerrequired

Registered confidential integration credentials. Keep the secret server-side.

or
CookieAPI key · headerrequired

Console-managed Vault session cookie; secure cookie naming may vary by environment.

or
AuthorizationBearer token (Vault TEST service token) · headerrequired

Customer- and resource-bound service grant, rechecked on every call. Existing Live opening-feed authority remains narrow; ordinary Test business requests refuse until shared Test composition is available.

or
AuthorizationBearer token (Vault organization API key) · headerrequired

Organization-owned credential with immutable mode and Read-only or Read/write permissions. Only explicitly declared ordinary customer operations accept it. Test business access refuses until shared Test composition is available; no staff, team, key-management or protocol authority is granted.

Path parameters
orgIdstringrequired
min length 1 · max length 128 · matches ^[A-Za-z0-9_-]+$
purchaseOrderIdstringrequired
min length 1 · max length 128 · matches ^[A-Za-z0-9_-]+$
Request body
requiredapplication/json
expectedDeclarationRevisionintegerrequired
min 1 · max 9007199254740991
linesobject[]required
min items 1 · max items 500
Show properties
Array of object
declaredConditionstring | null
Show properties
Any of:
string
string
null
null
declaredQuantityintegerrequired
min 0 · max 100000
lineIdstringrequired
min length 1 · max length 128 · matches ^[A-Za-z0-9_-]+$
productIdstringrequired
min length 1 · max length 128 · matches ^[A-Za-z0-9_-]+$
submittedNamestring
min length 1 · max length 200
supplierSkustring | null
Show properties
Any of:
string
string
null
null
submissionKeystringrequired
min length 8 · max length 128 · matches ^[A-Za-z0-9_.:-]+$
Responses
200

Success

dataobjectrequired
Show properties
effectsstring[]required
operationIdstringrequired
outcomestringrequired
purchaseOrderobjectrequired
Show properties
declarationRevisionintegerrequired
min 1 · max 9007199254740991
idstring<uuid>required
matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
lineIdsstring<uuid>[]required
poNumberstringrequired
min length 1 · max length 200
providerPoRefstring | nullrequired
Show properties
Any of:
string
string
null
null
depositobject
Show properties
providerVerifiedbooleanrequired
depositRefstringrequired
min length 1 · max length 200
labelRefstringrequired
min length 1 · max length 200
trackingstringrequired
min length 1 · max length 200
metaobjectrequired
Show properties
requestIdstringrequired
default

Error

errorobjectrequired
Show properties
codestringrequired
Allowed:forbiddeninternal_errornot_foundprovider_data_invalidprovider_outcome_unknownprovider_unavailablerate_limitedstate_conflictunauthenticatedvalidation_errorwarehouse_not_ready
fieldsobject[]
Show properties
Array of object
codestringrequired
messagestringrequired
pathstringrequired
messagestringrequired
operationIdstring
metaobjectrequired
Show properties
requestIdstringrequired
Request
curl -X PATCH '/v1/organizations/string/purchase-orders/string' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "expectedDeclarationRevision": 1,
  "lines": [
    {
      "declaredCondition": "nm",
      "declaredQuantity": 0,
      "lineId": "string",
      "productId": "string",
      "submittedName": "string",
      "supplierSku": "string"
    }
  ],
  "submissionKey": "stringst"
}'
Response
{
  "data": {
    "effects": [
      "string"
    ],
    "operationId": "string",
    "outcome": "confirmed",
    "purchaseOrder": {
      "declarationRevision": 1,
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "lineIds": [
        "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      ],
      "poNumber": "string",
      "providerPoRef": "string",
      "deposit": {
        "providerVerified": false,
        "depositRef": "string",
        "labelRef": "string",
        "tracking": "string"
      }
    }
  },
  "meta": {
    "requestId": "string"
  }
}

Was this page helpful?