Create a talon one account

How to create a talon one account via API

To createarrow-up-right a new talon one account, send a POST request to the /api/talon_one_accounts endpoint, passing the resource arguments in the request body.

Request

POST https://yourdomain.commercelayer.io/api/talon_one_accounts

Arguments

Body Parameter
Type
Required

type

string

Required

attributes.name

string

Required

attributes.manage_gift_cards

boolean

Optional, default is 'true'

attributes.reference

string

Optional

attributes.reference_origin

string

Optional

attributes.metadata

object

Optional

attributes.api_key

string

Required

attributes.baseurl

string

Required

Example

The following request creates a new talon one account:

curl -g -X POST \
  'https://yourdomain.commercelayer.io/api/talon_one_accounts' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer your-access-token' \
  -H 'Content-Type: application/vnd.api+json' \
  -d '{
  "data": {
    "type": "talon_one_accounts",
    "attributes": {
      "name": "Personal discount engine",
      "api_key": "TALON_ONE_API_KEY",
      "baseurl": "yourbaseurl"
    }
  }
}'

Last updated