Orders
Orders Add Line Items Create
Add additional items to the order and charge the initial order payment method.
Authorization
oauth2 orders:writeAuthorizationBearer <token>
Generate an Access Token through Settings > API Access for single store access or use the Authorization Code flow with your partner App Client ID. Use required permission scopes for API endpoint access. Example Authorization: Bearer 123
In: header
Scope: orders:write
Path Parameters
number*Order number
Header Parameters
X-29next-API-Version*"unstable"
Default
"unstable"Value in
- "unstable"
Any transaction that be a part of handle_payment, for saving and update status of order
Response Body
application/json
curl -X POST "https://example.com/orders/string/add-line-items/" \ -H "X-29next-API-Version: unstable" \ -H "Content-Type: application/json" \ -d '{ "lines": [ { "product_id": 0, "quantity": 1 } ] }'{ "attribution": { "affiliate": "string", "agent": { "email": "user@example.com", "first_name": "string", "id": 0, "last_name": "string" }, "funnel": "string", "gclid": "string", "metadata": null, "subaffiliate1": "string", "subaffiliate2": "string", "subaffiliate3": "string", "subaffiliate4": "string", "subaffiliate5": "string", "utm_campaign": "string", "utm_content": "string", "utm_medium": "string", "utm_source": "string", "utm_term": "string" }, "billing_address": { "country": "string", "first_name": "string", "id": 0, "last_name": "string", "line1": "string", "line2": "string", "line3": "string", "line4": "string", "phone_number": "string", "postcode": "string", "state": "string" }, "created_at": "2019-08-24T14:15:22Z", "currency": "string", "date_placed": "2019-08-24T14:15:22Z", "display_taxes": "string", "fulfillment_status": "not_required", "fulfillments": [ { "created_at": "2019-08-24T14:15:22Z", "delivered_at": "2019-08-24T14:15:22Z", "delivery_status": null, "id": 0, "last_event_date": "2019-08-24T14:15:22Z", "line_items": [ { "currency": "string", "fulfilled_quantity": "string", "fulfillment_service": "string", "id": 0, "order_line_id": 0, "price_excl_tax": "string", "price_incl_tax": "string", "product_id": 0, "product_image": "http://example.com", "product_title": "string", "properties": [ { "key": "string", "value": null } ], "quantity": 0, "requires_shipping": true, "returnable_quantity": "string", "returned_quantity": "string", "sku": "string", "tax_lines": [ { "amount": "string", "currency": "string", "rate": 0.1, "report_values": { "amount": "string", "currency": "string" }, "source": "string", "tax_id": 0, "tax_title": "string" } ], "total_discount": "string" } ], "location_id": 0, "order_number": "string", "origin_address": { "country": "string", "line1": "string", "line2": "string", "line3": "string", "line4": "string", "phone_number": "string", "postcode": "string", "state": "string" }, "processing_at": "2019-08-24T14:15:22Z", "requires_shipping": true, "shipping_method": "string", "status": "success", "tracking_carrier": "string", "tracking_carriers": "string", "tracking_code": "string", "tracking_codes": "string", "tracking_link": "string", "tracking_links": "http://example.com" } ], "is_test": true, "lines": [ { "created_at": "2019-08-24T14:15:22Z", "currency": "string", "current_quantity": 0, "editable_quantity": 0, "fulfillable_quantity": 0, "id": 0, "is_gift_card": true, "is_upsell": true, "metadata": null, "original_price_excl_tax": "string", "original_price_incl_tax": "string", "original_total_discount": "string", "price_excl_tax": "string", "price_incl_tax": "string", "product_id": 0, "product_image": "http://example.com", "product_title": "string", "product_url": "http://example.com", "properties": [ { "key": "string", "value": null } ], "quantity": 0, "report_values": { "currency": "str", "original_price_excl_tax": "string", "original_price_incl_tax": "string", "original_total_discount": "string", "price_excl_tax": "string", "price_incl_tax": "string", "total_cost": "string", "total_discount": "string", "unit_cost": "string" }, "requires_shipping": true, "sku": "string", "tax_lines": [ { "amount": "string", "currency": "string", "rate": 0.1, "report_values": { "amount": "string", "currency": "string" }, "source": "string", "tax_id": 0, "tax_title": "string" } ], "total_cost": "string", "total_discount": "string", "unit_cost": "string", "updated_at": "2019-08-24T14:15:22Z", "variant_id": 0, "variant_title": "string" } ], "metadata": null, "number": "string", "offer_discounts": [ { "amount": "string", "description": "string", "name": "string" } ], "order_status_url": "http://example.com", "original_shipping_excl_tax": "string", "original_shipping_incl_tax": "string", "original_total_discount": "string", "original_total_excl_tax": "string", "original_total_incl_tax": "string", "payment_status": "pending", "refunds": [ { "adjustments": [ { "amount_excl_tax": "string", "amount_incl_tax": "string", "id": 0, "report_values": { "amount_excl_tax": "string", "amount_incl_tax": "string", "currency": "string" }, "type": "refund_shipping" } ], "created_at": "2019-08-24T14:15:22Z", "id": 0, "note": "string", "order_number": "string", "refund_line_items": [ { "amount_excl_tax": "string", "amount_incl_tax": "string", "id": 0, "line_item_id": 0, "location_id": 0, "quantity": 0, "report_values": { "amount_excl_tax": "string", "amount_incl_tax": "string", "currency": "string" }, "restock_type": "cancel" } ], "report_values": { "currency": "string", "total_refund_amount": "string", "total_return_excl_tax": "string", "total_return_incl_tax": "string" }, "total_refund_amount": "string", "total_return_excl_tax": "string", "total_return_incl_tax": "string", "transactions": [ { "amount": "string", "auth_code": "string", "currency": "string", "date_created": "2019-08-24T14:15:22Z", "external_id": "string", "id": 0, "is_disputed": true, "is_external": true, "is_initial_retry": true, "is_test": true, "network_transaction_id": "string", "parent_id": 0, "payment_details": { "bankcard_first_six": "string", "bankcard_last_four": "string", "card_token": "string", "gateway": { "id": 0, "is_next_payments": true, "name": "string", "type": "string" }, "is_3ds": true, "optimized_3ds": true, "paypal_vault_id": "string", "sca_flow": "string" }, "payment_method": "string", "report_values": { "amount": "string", "currency": "string" }, "response_code": 0, "statement_descriptor": "string", "status": "succeeded", "type": "string" } ], "user_id": 0 } ], "report_values": { "currency": "string", "original_shipping_excl_tax": "string", "original_shipping_incl_tax": "string", "original_total_discount": "string", "original_total_excl_tax": "string", "original_total_incl_tax": "string", "shipping_excl_tax": "string", "shipping_incl_tax": "string", "total_cost": "string", "total_discount": "string", "total_excl_tax": "string", "total_incl_tax": "string" }, "shipping_address": { "country": "string", "first_name": "string", "id": 0, "last_name": "string", "line1": "string", "line2": "string", "line3": "string", "line4": "string", "notes": "string", "phone_number": "string", "postcode": "string", "state": "string" }, "shipping_code": "string", "shipping_excl_tax": "string", "shipping_incl_tax": "string", "shipping_method": "string", "shipping_tax": "string", "shipping_tax_lines": [ { "amount": "string", "currency": "string", "rate": 0.1, "report_values": { "amount": "string", "currency": "string" }, "source": "string", "tax_id": 0, "tax_title": "string" } ], "source": "string", "status": "string", "subscription_lifecycle": "string", "subscriptions": [ { "billing_cycle": 0, "id": 0 } ], "supports_post_purchase_upsells": true, "tags": [ "string" ], "tax_lines": [ { "amount": "string", "currency": "string", "id": 0, "rate": 0.1, "report_values": { "amount": "string", "currency": "string" }, "source": "string", "tax_title": "string" } ], "total_cost": "string", "total_discount": "string", "total_excl_tax": "string", "total_incl_tax": "string", "total_outstanding": "string", "total_tax": "string", "transactions": [ { "amount": "string", "auth_code": "string", "currency": "string", "date_created": "2019-08-24T14:15:22Z", "external_id": "string", "id": 0, "is_disputed": true, "is_external": true, "is_initial_retry": true, "is_test": true, "network_transaction_id": "string", "parent_id": 0, "payment_details": { "bankcard_first_six": "string", "bankcard_last_four": "string", "card_token": "string", "gateway": { "id": 0, "is_next_payments": true, "name": "string", "type": "string" }, "is_3ds": true, "optimized_3ds": true, "paypal_vault_id": "string", "sca_flow": "string" }, "payment_method": "string", "report_values": { "amount": "string", "currency": "string" }, "response_code": 0, "statement_descriptor": "string", "status": "succeeded", "type": "string" } ], "updated_at": "2019-08-24T14:15:22Z", "user": { "accepts_marketing": true, "email": "user@example.com", "first_name": "string", "id": 0, "ip": "string", "language": "string", "last_name": "string", "phone_number": "string", "user_agent": "string" }, "voucher_discounts": [ { "amount": "string", "description": "string", "name": "string", "voucher": { "code": "string", "end_datetime": "2019-08-24T14:15:22Z", "name": "string", "start_datetime": "2019-08-24T14:15:22Z" } } ]}