Skip to content

Shop orders

Orders. POST enters a manual order; status, lines and addresses change through actions; custom fields change through PATCH.

Module: Online shop (shop).

  • GET /api/v1/shop_orders - List with filters, sorting and pagination (scope shop:read)
  • GET /api/v1/shop_orders/{id} - A record by id (scope shop:read)
  • POST /api/v1/shop_orders - Create a record (scope shop:write)
  • POST /api/v1/shop_orders/{id}/set_state - Changes the order, payment or delivery status. (scope shop:write)
  • POST /api/v1/shop_orders/{id}/edit_lines - Replaces the order lines. Send version so you do not overwrite a change made in the meantime. (scope shop:write)
  • POST /api/v1/shop_orders/{id}/set_details - Changes the contact details and addresses. (scope shop:write)
  • POST /api/v1/shop_orders/{id}/set_note - The order’s internal note. (scope shop:write)
  • POST /api/v1/shop_orders/{id}/create_invoice - The order’s draft invoice. Repeating returns the existing invoice. (scope shop:write, invoices:write)
  • POST /api/v1/shop_orders/{id}/create_shipment - Creates an AWB with the courier. Careful: the real AWB is paid for; without parameters it takes everything not yet shipped, in one parcel. (scope shop:write)
  • id (string, uuid; read): Unique identifier (UUID).
  • number (string; read)
  • channel_id (string; write, required)
  • party_id (string, uuid; write)
  • account_id (string, uuid; read)
  • cart_id (string, uuid; read)
  • email (string, email; write, required)
  • phone (string; write)
  • billing_address (object; read)
  • shipping_address (object; read)
  • order_status (string; read)
  • payment_status (string; read)
  • fulfillment_status (string; read)
  • payment_method (string; write)
  • shipping_rate_id (string, uuid; read)
  • shipping_name (string; read)
  • currency (string; read): Currency (ISO code, e.g. RON).
  • subtotal (number; read)
  • discount_total (number; read)
  • shipping_total (number; read)
  • cod_fee (number; read)
  • tax_total (number; read)
  • total (number; read)
  • source (string; read)
  • external_ref (string; read)
  • invoice_id (string, uuid; read)
  • customer_note (string; write)
  • internal_note (string; read)
  • is_test (boolean; read)
  • legal_versions (object; read)
  • attribution (object; read)
  • version (integer; read)
  • created_at (string, date-time; read): Creation date (ISO 8601).
  • updated_at (string, date-time; read): Last modification date (ISO 8601).
  • discount_id (string, uuid; read)
  • custom_fields (object; read): Custom fields (key-value object). Definitions are created in the ERP; see the guide on docs.rivil.app.
  • shipping (string; write, required)
  • billing (string; write)
  • lines (array; write, required)
  • shipping_gross (number; write)
  • cod_fee_gross (number; write)
  • shop_orders.created
  • shop_orders.updated
  • shop_orders.deleted

Accepts custom fields in custom_fields. docs.rivil.app documents the capability; the list for your company is in the ERP, under Settings, API.