curl -X POST '{backend_url}/admin/store-credit-accounts' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"currency_code": "nzd",
"customer_id": "{value}"
}'
{
"store_credit_account": {
"customer": {
"id": "<string>",
"has_account": true,
"groups": [
{
"id": "<string>",
"name": "<string>",
"customers": [
{}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"email": "jsmith@example.com",
"default_billing_address_id": "<string>",
"default_shipping_address_id": "<string>",
"company_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"addresses": [
{
"id": "<string>",
"address_name": "<string>",
"is_default_shipping": true,
"is_default_billing": true,
"customer_id": "<string>",
"company": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"country_code": "us",
"province": "us-ca",
"postal_code": "<string>",
"phone": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"phone": "<string>",
"metadata": {},
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
},
"id": "<string>",
"customer_id": "<string>",
"currency_code": "usd",
"credits": 123,
"debits": 123,
"balance": 123,
"transaction_groups": [
{
"id": "<string>",
"code": "<string>",
"credits": 123,
"debits": 123,
"balance": 123,
"account": {},
"metadata": {}
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
Create a store credit account.
curl -X POST '{backend_url}/admin/store-credit-accounts' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"currency_code": "nzd",
"customer_id": "{value}"
}'
{
"store_credit_account": {
"customer": {
"id": "<string>",
"has_account": true,
"groups": [
{
"id": "<string>",
"name": "<string>",
"customers": [
{}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"email": "jsmith@example.com",
"default_billing_address_id": "<string>",
"default_shipping_address_id": "<string>",
"company_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"addresses": [
{
"id": "<string>",
"address_name": "<string>",
"is_default_shipping": true,
"is_default_billing": true,
"customer_id": "<string>",
"company": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"country_code": "us",
"province": "us-ca",
"postal_code": "<string>",
"phone": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"phone": "<string>",
"metadata": {},
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
},
"id": "<string>",
"customer_id": "<string>",
"currency_code": "usd",
"credits": 123,
"debits": 123,
"balance": 123,
"transaction_groups": [
{
"id": "<string>",
"code": "<string>",
"credits": 123,
"debits": 123,
"balance": 123,
"account": {},
"metadata": {}
}
],
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Comma-separated fields that should be included in the returned data.
if a field is prefixed with +
it will be added to the default fields, using -
will remove it from the default fields.
without prefix it will replace the entire default fields.
The details of the store credit account to create.
OK
The store credit account's details.