Add extra fields to order

POST https://app.ecwid.com/api/v3/{storeId}/orders/{orderId}/extraFields

Request and response example

Request:

POST /api/v3/1003/orders/JJ5HH/extraFields/tips HTTP/1.1
Authorization: Bearer secret_token
Host: app.ecwid.com
Content-Type: application/json
Cache-Control: no-cache

{
    "id": "reference_number",
    "value": "#334-3340-1",
    "customerInputType": "TEXT",
    "title": "Affiliate number",
    "orderDetailsDisplaySection": "billing_info",
    "showInNotifications": false,
    "showInInvoice": false
}

Response:

{
    "createCount": 1
}

Required access scopes

Your app must have the following access scopes to make this request: update_orders

Path params

All path params are required.

Param
Type
Description

storeId

number

Ecwid store ID.

orderId

string

Order ID. Can contain prefixes and suffixes, for example: EG4H2,J77J8,SALE-G01ZG

Headers

The Authorization header is required.

Header
Format
Description

Authorization

Bearer secret_ab***cd

Access token of the application.

Request JSON

A JSON object with the following fields:

Field
Type
Description

id

string

Unique order extra field ID. Required

value

string

Value saved to the order extra field. Required

customerInputType

string

Extra field type. One of:

TEXT (default, if not specified)

TEXTAREA

SELECT

CHECKBOX

TOGGLE_BUTTON_GROUP

RADIO_BUTTONS

DATETIME

LABEL

title

string

Name visible at the checkout above the extra field. Required

orderDetailsDisplaySection

string

Defines where on the order details page the extra field is shown to the store owner. One of: shipping_info - Order shipping details. billing_info - Order payment details. customer_info - Details about the customer. order_comments - Order comments left by the customer.

orderBy

string

Number that defines the extra field position in Ecwid admin. The smaller the number, the higher the position is. Starts with "0" and iterates by 1.

showInNotifications

boolean

Defines if extra field should be visible in order emails sent to the customer. Disabled by default (false). The orderDetailsDisplaySection value defines where the extra field will appear.

showInInvoice

boolean

Defines if the extra field should be visible in order tax invoices.

Last updated

Was this helpful?