New buyer
/buyers
curl --request POST \
--url https://api.sandbox.{gr4vy_id}.gr4vy.app/buyers \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json'
{
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"merchant_account_id": "default",
"external_identifier": "user-789123",
"display_name": "John L.",
"billing_details": {
"type": "billing-details",
"first_name": "John",
"last_name": "Lunn",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "London",
"country": "GB",
"postal_code": "789123",
"state": "Greater London",
"state_code": "GB-LND",
"house_number_or_name": "10",
"line1": "10 Oxford Street",
"line2": "New Oxford Court",
"organization": "Gr4vy"
},
"tax_id": {
"value": "12345678931",
"kind": "gb.vat"
}
},
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00"
}
This endpoint requires the buyers.write
scope.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
An external identifier that can be used to match the buyer against your own records. This value needs to be unique for all buyers.
A unique name for this buyer which is used in the Gr4vy admin panel to give a buyer a human readable name.
The optional billing details to associate with a buyer.
Response
The type of this resource. Is always buyer
.
buyer
The unique Gr4vy ID for this buyer.
The unique ID for a merchant account.
An external identifier that can be used to match the buyer against your own records.
A unique name for this buyer which is used in the Gr4vy admin panel to give a buyer a human readable name.
The billing details associated with a buyer.
The date and time when this buyer was created in our system.
The date and time when this buyer was last updated in our system.
curl --request POST \
--url https://api.sandbox.{gr4vy_id}.gr4vy.app/buyers \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json'
{
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"merchant_account_id": "default",
"external_identifier": "user-789123",
"display_name": "John L.",
"billing_details": {
"type": "billing-details",
"first_name": "John",
"last_name": "Lunn",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "London",
"country": "GB",
"postal_code": "789123",
"state": "Greater London",
"state_code": "GB-LND",
"house_number_or_name": "10",
"line1": "10 Oxford Street",
"line2": "New Oxford Court",
"organization": "Gr4vy"
},
"tax_id": {
"value": "12345678931",
"kind": "gb.vat"
}
},
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00"
}