Orders

Quote an order

POST/v2/accounts/{accountId}/orders/quoteTry it

Prices an order without creating it: the amount createOrder would debit for the same body, with the account's balance and whether it is enough. Send the body you would send to createOrder: the country is read from countryCode, else shipTo.address.countryCode, else shipTo.servicePoint.country; the rest of shipTo, reference and metadata are not read, and only the presence of printingVisuals counts. Nothing is created or debited.

Request

Authorization

Bearer token

Send your API key in the Authorization header: Authorization: Bearer sk_test_…. A sk_test_ key creates and sees test orders only. Keys and test mode.

Path parameters
  • accountIdstringrequired
    Unique identifier of the account, or the alias @me for the account authenticated by the token. An API key or an OAuth token acts on its own account only: another account's id is refused with 403 ACCOUNT_ACCESS_DENIED.
Body application/json
  • countryCodestring
    Delivery country (ISO 3166-1 alpha-2), instead of shipTo
  • shipToobject
    As in createOrder: only its country is read
  • carrierServiceIdstring
    ID of the carrier service to use for shipping. Defaults to 'lpf_standard' if not provided. Use a service that supports service points when shipTo contains a servicePoint.
  • itemsarray of objectrequired
  • items[].quantityintegerrequired
    Quantity of the product
  • items[].productIdstring: pvccard_white, mifare1k_pvccard_white, ntag213_pvccard_white, ntag216_pvccard_white, ntag424_pvccard_white, ntag424_woodcardrequired
    Product ID of the product
  • items[].metadataobject
    Additional metadata for the product
  • items[].packagingIdstring
    ID of the packaging
  • items[].printingVisualsarray of string (uuid), nullable
    List of printing visuals for the product, obtained from the files API
  • items[].nfcNFC or array of NFC

Responses

200The quote
400No country (MISSING_COUNTRY_CODE), an invalid line (INVALID_PARAMETERS, INVALID_QUANTITY), an unknown product (UNKNOWN_PRODUCT), or a carrier service that does not serve the parcel or the country (CARRIER_SERVICE_NOT_AVAILABLE)

Type: Error

401Unauthorized, authentication required, or an OAuth access token unknown, expired or revoked (INVALID_TOKEN)

Type: Error

402The account has no plan, so no price (SUBSCRIPTION_REQUIRED)

Type: Error

403The API key is inactive or revoked (INACTIVE_API_KEY), or the path names another account (ACCOUNT_ACCESS_DENIED); with an OAuth access token: a token of scope mcp (INSUFFICIENT_SCOPE), a path naming another account or a person no longer a member of it (ACCOUNT_ACCESS_DENIED), a real token on the sandbox host (SANDBOX_REQUIRES_TEST_KEY)

Type: Error

500Internal server error

Type: Error

Request
curl -X POST "https://api.printags.com/v2/accounts/@me/orders/quote" \
  -H "Authorization: Bearer $PRINTAGS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"countryCode":"FR","carrierServiceId":"lpf_standard","items":[{"quantity":10,"productId":"ntag424_pvccard_white","metadata":{"internalId":"a3d3842e-89c0-41d2-9384-2e89c021d2bc"},"packagingId":"aluminum_protection","printingVisuals":["0806a77d-8007-4cfc-86a7-7d80079cfc8f","a77d8007-007c-fc86-7a7d-80079cfc8f0"]}]}'
Response 200
{
  "success": true,
  "quote": {
    "currency": "eur",
    "mode": "production",
    "totalExclVat": 42.5,
    "shippingExclVat": 2.5,
    "lines": [
      {
        "modelId": "ntag213_pvccard_white",
        "quantity": 50,
        "unitPriceExclVat": 0.8,
        "lineTotalExclVat": 40,
        "unitCharges": {
          "model": 0.5,
          "printing": 0.3
        }
      }
    ],
    "balance": 30,
    "enoughFunds": true
  }
}