POST /custom-fields.json

POST /custom-fields.json
application/json

Body Required

  • fieldScope string | null Required

    Field scope

    Values are all or selected. Default value is all.

  • fieldType string | null Required

    Field type

    Values are string, text, image, file, or options. Default value is string.

  • helpText string | null

    Help text

  • icon string | null

    Icon

  • label string | null

    Label

  • name string Required

    Name

  • namespace string | null

    Namespace

  • options array[string] | null

    Options

  • resource string | null Required

    Resource

    Values are any, dropship_provider, dropshipment, dropshipment_item, reseller, purchase, purchase_item, sale, sale_item, sale_return, sale_return_item, variant, or vendor. Default value is any.

  • showInResellerPortal boolean | null

    Show in reseller portal

  • showInReturnPortal boolean | null Required

    Show in return portal

    Default value is false.

  • showInVendorPortal boolean | null Required

    Show in vendor portal

    Default value is false.

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • createdAt string(date-time)

      Created at

    • fieldScope string | null Required

      Field scope

      Values are all or selected. Default value is all.

    • fieldType string | null Required

      Field type

      Values are string, text, image, file, or options. Default value is string.

    • helpText string | null

      Help text

    • icon string | null

      Icon

    • id integer(int32)

      Id

    • label string | null

      Label

    • name string Required

      Name

    • namespace string | null

      Namespace

    • options array[string] | null

      Options

    • resource string | null Required

      Resource

      Values are any, dropship_provider, dropshipment, dropshipment_item, reseller, purchase, purchase_item, sale, sale_item, sale_return, sale_return_item, variant, or vendor. Default value is any.

    • showInResellerPortal boolean | null

      Show in reseller portal

    • showInReturnPortal boolean | null Required

      Show in return portal

      Default value is false.

    • showInVendorPortal boolean | null Required

      Show in vendor portal

      Default value is false.

    • updatedAt string(date-time)

      Updated at

POST /custom-fields.json
curl \
 -X POST http://api.example.com/v1/custom-fields.json \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"fieldScope":"all","fieldType":"string","helpText":"string","icon":"string","label":"string","name":"string","namespace":"string","options":["string"],"resource":"any","showInResellerPortal":true,"showInReturnPortal":false,"showInVendorPortal":false}'
Request example
{
  "fieldScope": "all",
  "fieldType": "string",
  "helpText": "string",
  "icon": "string",
  "label": "string",
  "name": "string",
  "namespace": "string",
  "options": [
    "string"
  ],
  "resource": "any",
  "showInResellerPortal": true,
  "showInReturnPortal": false,
  "showInVendorPortal": false
}
Response examples (200)
{
  "createdAt": "2024-05-04T09:42:00+00:00",
  "fieldScope": "all",
  "fieldType": "string",
  "helpText": "string",
  "icon": "string",
  "id": 42,
  "label": "string",
  "name": "string",
  "namespace": "string",
  "options": [
    "string"
  ],
  "resource": "any",
  "showInResellerPortal": true,
  "showInReturnPortal": false,
  "showInVendorPortal": false,
  "updatedAt": "2024-05-04T09:42:00+00:00"
}