POST /templates.json

POST /templates.json
application/json

Body Required

  • content string | null

    Content

  • customDelimiter string | null

    Custom delimiter

  • defaultMapping string | null Required

    Default mapping

    Values are custom or royalMail. Default value is custom.

  • delivery string | null Required

    Delivery

    Values are email or webhook. Default value is email.

  • format string Required

    Format

    Values are csv, json, html, xml, csv_mapping, or json_mapping. Default value is csv.

  • name string Required

    Name

  • resource string Required

    Resource

    Values are sales, purchases, variants, sale_items, or purchase_items.

  • visible boolean Required

    Visible

    Default value is true.

  • webhookEndpoint string | null

    Webhook endpoint

  • xmlDateDormat string | null

    Xml date dormat

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • content string | null

      Content

    • createdAt string(date-time)

      Created at

    • customDelimiter string | null

      Custom delimiter

    • defaultMapping string | null Required

      Default mapping

      Values are custom or royalMail. Default value is custom.

    • delivery string | null Required

      Delivery

      Values are email or webhook. Default value is email.

    • format string Required

      Format

      Values are csv, json, html, xml, csv_mapping, or json_mapping. Default value is csv.

    • id integer(int32)

      Id

    • name string Required

      Name

    • resource string Required

      Resource

      Values are sales, purchases, variants, sale_items, or purchase_items.

    • updatedAt string(date-time)

      Updated at

    • visible boolean Required

      Visible

      Default value is true.

    • webhookEndpoint string | null

      Webhook endpoint

    • xmlDateDormat string | null

      Xml date dormat

POST /templates.json
curl \
 -X POST http://api.example.com/v1/templates.json \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"content":"string","customDelimiter":"string","defaultMapping":"custom","delivery":"email","format":"csv","name":"string","resource":"sales","visible":true,"webhookEndpoint":"string","xmlDateDormat":"string"}'
Request example
{
  "content": "string",
  "customDelimiter": "string",
  "defaultMapping": "custom",
  "delivery": "email",
  "format": "csv",
  "name": "string",
  "resource": "sales",
  "visible": true,
  "webhookEndpoint": "string",
  "xmlDateDormat": "string"
}
Response examples (200)
{
  "content": "string",
  "createdAt": "2024-05-04T09:42:00+00:00",
  "customDelimiter": "string",
  "defaultMapping": "custom",
  "delivery": "email",
  "format": "csv",
  "id": 42,
  "name": "string",
  "resource": "sales",
  "updatedAt": "2024-05-04T09:42:00+00:00",
  "visible": true,
  "webhookEndpoint": "string",
  "xmlDateDormat": "string"
}