v1

latestOpenAPI 3.0.12026-07-243266138.0 KB
invites

Schedule new invites

This endpoint allows clients to schedule new review invites in eTrusted.

post/invites

Request body

systemstring required

Name of the customer's system

systemVersionstring required

Version of the customer's system

Example request

{
  "channel": {
    "id": "chl-f8c8c9c3-93ff-48dd-1111-629196b5955a",
    "type": "user_defined"
  },
  "system": "Magento",
  "systemVersion": "1.0.0",
  "invites": [
    {
      "questionnaireTemplate": {
        "id": "tpl-qst-12261ad3-d36b-4a3a-a4ab-850920d7b11f"
      },
      "template": {
        "id": "tpl-inv-12261ad3-d36b-4a3a-a4ab-850920d7b11f"
      },
      "customer": {
        "firstName": "John",
        "lastName": "Doe",
        "email": "user@example.com"
      },
      "locale": "de_DE",
      "transaction": {
        "reference": "ORDER-121416990",
        "date": "2017-11-01T13:30:15Z"
      },
      "products": [
        {
          "gtin": "1234567890123",
          "imageUrl": "https://www.specialbrandshop.com/article123-TS-WH-M/image.jpg",
          "name": "Specialbrand T-Shirt White M",
          "mpn": "23687778",
          "sku": "1234-TS-WH-M",
          "brand": "specialbrand",
          "url": "https://www.specialbrandshop.com/article123-TS-WH-M/"
        }
      ],
      "preferredSendTime": "2018-02-01T17:09:41.79Z",
      "metadata": {
        "carModel": "Touareg",
        "carColor": "silver"
      }
    }
  ]
}

Response

Multi-Status

batchIdstring

The eTrusted unique identifier of the request with invites. It will be returned only if some invites were successfully scheduled (successfulInvites>0).

successfulInvitesinteger required

The number of successfully scheduled invites.

Example response

{
  "batchId": "ibr-12261ad3-d36b-4a3a-a4ab-850920d7b11f",
  "successfulInvites": 25,
  "failedInvites": [
    {
      "initialInvite": {
        "questionnaireTemplate": {
          "id": "tpl-qst-12261ad3-d36b-4a3a-a4ab-850920d7b11f"
        },
        "template": {
          "id": "tpl-inv-12261ad3-d36b-4a3a-a4ab-850920d7b11f"
        },
        "customer": {
          "firstName": "John",
          "lastName": "Doe",
          "email": "user@example.com"
        },
        "locale": "de_DE",
        "transaction": {
          "reference": "ORDER-121416990",
          "date": "2017-11-01T13:30:15Z"
        },
        "products": [
          {
            "gtin": "1234567890123",
            "imageUrl": "https://www.specialbrandshop.com/article123-TS-WH-M/image.jpg",
            "name": "Specialbrand T-Shirt White M",
            "mpn": "23687778",
            "sku": "1234-TS-WH-M",
            "brand": "specialbrand",
            "url": "https://www.specialbrandshop.com/article123-TS-WH-M/"
          }
        ],
        "preferredSendTime": "2018-02-01T17:09:41.79Z",
        "metadata": {
          "carModel": "Touareg",
          "carColor": "silver"
        }
      },
      "status": 400,
      "reasons": [
        "invalid_email"
      ]
    }
  ]
}