Examples#
Practical step-by-step guides for common tasks with the Afosto GraphQL API.
Cart and checkout#
- Create a cart and go to checkout — Build a cart from products, attach a shipping address and method, then convert to an order with a checkout URL.
Orders#
- List orders — Fetch a paginated list of orders, with optional filtering by email, order number, ID, progress, or creation date.
- Change the billing address on an order — Update or replace the billing address attached to an existing order.
Payments and invoicing#
- Take a PIN payment and invoice items — Create an order, attach a PIN payment method to a specific terminal, execute the payment, then invoice the items and retrieve the PDF.
Fulfilment and shipping#
- Create a parcel and add track & trace — Group order items into a parcel for a delivery, attach a carrier tracking number, and expose it to the customer.
- Set and read shipping dates and track & trace — Set the suggested ship date and expected delivery date on order items, read the actual shipping date once the delivery is processed, and retrieve the carrier tracking link.