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

Create a customer purchase order

Create a customer purchase-order declaration in the selected immutable mode. Player deposits require explicit eligibility for that mode and a returnAddress for ship-back. Test eligibility admits configured raw-condition and sealed pack/box/case declarations using isolated inventory and a synthetic prepaid-label association. Live deposits keep their separate customer and deployment controls; Test setup does not activate Live intake or background deposit runs. A raw line may set conditionDeferred to leave its declared grade unset; a sealed line must specify sealedUnit. Use the returned local PO ID to read deposit-results after assessment and acceptance. An exact submission-key replay returns its original receipt; changed intent conflicts. Graded-card deposits, cert lookups and exact-slab workflows are deferred from the current integration scope. Test creates no provider PO, real label purchase, charge or shipment.

POST/v1/organizations/{orgId}/purchase-orders
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_-]+$
Request body
requiredapplication/json
expectedDatestring<date> | null
Show properties
Any of:
string<date>
string<date>
null
null
linesobject[]required
min items 1 · max items 500
Show properties
Array of object
productIdstringrequired
min length 1 · max length 128 · matches ^[A-Za-z0-9_-]+$
quantityintegerrequired
min 1 · max 100000
conditionDeferredboolean
slabsobject[]

Legacy compatibility field. Graded-card deposits and cert lookups are deferred from the current integration scope; use supported raw-card and sealed-item declarations.

min items 1 · max items 100
Show properties
Array of object
graderstringrequired
Allowed:psabgscgc
certstringrequired

Legacy graded-card certificate identifier retained for compatibility. Graded-card deposits, cert lookups and exact-slab workflows are deferred from the current integration scope.

max length 40
sealedUnitstring
Allowed:packboxcase
magneticSlabstring
Allowed:brandedbranded_tamper_seal
professionalGradingboolean
notestring | null
Show properties
Any of:
string
string
null
null
orderDatestring<date> | null
Show properties
Any of:
string<date>
string<date>
null
null
poNumberstring
min length 1 · max length 200
registrationKindstring
default: "standard"
Allowed:standardplayer_deposit
depositRefstring | null
Show properties
Any of:
string
string
null
null
labelOriginstring | null
Show properties
Any of:
string
string
null
null
labelServicestring | null
Show properties
Any of:
string
string
null
null
returnAddressobject | null
Show properties
Any of:
object
namestringrequired
min length 1 · max length 200
companyNamestring | null
Show properties
Any of:
string
string
null
null
addressLine1stringrequired
min length 1 · max length 200
addressLine2string | null
Show properties
Any of:
string
string
null
null
citystringrequired
min length 1 · max length 200
regionstring | null
Show properties
Any of:
string
string
null
null
postalCodestringrequired
min length 1 · max length 20
countryCodestringrequired
matches ^[A-Za-z]{2}$
phonestring | null
Show properties
Any of:
string
string
null
null
emailstring<email> | null
Show properties
Any of:
string<email>
string<email>
null
null
null
null
submissionKeystringrequired
min length 8 · max length 128 · matches ^[A-Za-z0-9_.:-]+$
trackingstring | null
Show properties
Any of:
string
string
null
null
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)$
poNumberstringrequired
min length 1 · max length 200
providerPoRefstring | nullrequired
Show properties
Any of:
string
string
null
null
depositobject
Show properties
adapterobjectrequired
Show properties
idstringrequired
min length 1
labelstringrequired
min length 1
providerVerifiedbooleanrequired
depositRefstringrequired
min length 1 · max length 200
labelobjectrequired
Show properties
documentIdstring<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)$
labelRefstringrequired
min length 1 · max length 200
providerRefstringrequired
min length 1 · max length 200
trackingstringrequired
min length 1 · max length 200
sourcestringrequired
Allowed:player_deposit
slabsobject[]

Historical graded-card metadata retained for compatibility. Graded-card deposits and cert lookups are deferred from the current integration scope.

Show properties
Array of object
certstringrequired
min length 1
graderstringrequired
Allowed:psabgscgc
lookupstringrequired
Allowed:verifiedpending
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 POST '/v1/organizations/string/purchase-orders' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "expectedDate": "2019-08-24",
  "lines": [
    {
      "productId": "string",
      "quantity": 1,
      "conditionDeferred": true,
      "slabs": [
        {
          "grader": "psa",
          "cert": "string"
        }
      ],
      "sealedUnit": "pack",
      "magneticSlab": "branded",
      "professionalGrading": true
    }
  ],
  "note": "string",
  "orderDate": "2019-08-24",
  "poNumber": "string",
  "registrationKind": "standard",
  "depositRef": "string",
  "labelOrigin": "string",
  "labelService": "string",
  "returnAddress": {
    "name": "string",
    "companyName": "string",
    "addressLine1": "string",
    "addressLine2": "string",
    "city": "string",
    "region": "string",
    "postalCode": "string",
    "countryCode": "string",
    "phone": "string",
    "email": "user@example.com"
  },
  "submissionKey": "stringst",
  "tracking": "string"
}'
Response
{
  "data": {
    "effects": [
      "string"
    ],
    "operationId": "string",
    "outcome": "confirmed",
    "purchaseOrder": {
      "declarationRevision": 1,
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "poNumber": "string",
      "providerPoRef": "string",
      "deposit": {
        "adapter": {
          "id": "string",
          "label": "string",
          "providerVerified": false
        },
        "depositRef": "string",
        "label": {
          "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
          "labelRef": "string",
          "providerRef": "string",
          "tracking": "string"
        },
        "source": "player_deposit"
      },
      "slabs": [
        {
          "cert": "string",
          "grader": "psa",
          "lookup": "verified"
        }
      ]
    }
  },
  "meta": {
    "requestId": "string"
  }
}