curl -X POST '{backend_url}/admin/store-credit-accounts' \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"currency_code": "nzd",
"customer_id": "{value}"
}'{
"store_credit_account": {
"customer": {
"id": "<string>",
"has_account": true,
"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"
}
],
"groups": [
{
"id": "<string>",
"name": "<string>",
"customers": [
{}
],
"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 {jwt_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"currency_code": "nzd",
"customer_id": "{value}"
}'{
"store_credit_account": {
"customer": {
"id": "<string>",
"has_account": true,
"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"
}
],
"groups": [
{
"id": "<string>",
"name": "<string>",
"customers": [
{}
],
"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.
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.
The store credit account's details.
Show child attributes
The customer's details.
Show child attributes
The customer's ID.
Whether the customer is registered.
The customer's email.
The ID of the address used as the default billing address.
The ID of the address used as the default shipping address.
The customer's company name.
The customer's first name.
The customer's last name.
The customer's addresses.
Show child attributes
The address's ID.
The address's name.
Whether the address is the default shipping address.
Whether the address is the default billing address.
The ID of the customer that this address belongs to.
The customer's company.
The customer's first name.
The customer's last name.
The address's first line.
The address's second line.
The address's city.
The address's country code.
"us"
The address's lower-case ISO 3166-2 province code.
"us-ca"
The address's postal code.
The address's phone.
The address's metadata, used to store custom key-value pairs.
The address's creation date.
The address's update date.
The customer's groups.
Show child attributes
The customer group's ID.
The customer group's name.
The customer group's customers.
The customer group's metadata, used to store custom key-value pairs.
The customer group's creation date.
The customer group's update date.
The customer's phone.
The customer's metadata, used to store custom key-value pairs.
The ID of the user that created this customer, if available.
The customer's creation date.
The customer's update date.
The customer's deletion date.
The store credit account's ID.
The ID of the customer that the store credit account belongs to.
The store credit account's currency code.
"usd"
The account's credits.
The account's debits.
The account's balance.
The store credit account's transaction groups.
Show child attributes
The transaction group's ID.
The transaction group's code.
The transaction group's credits.
The transaction group's debits.
The transaction group's balance.
The transaction group's metadata, can hold custom key-value pairs.
The store credit account's metadata, can hold custom key-value pairs.
The date the store credit account was created at.
The date the store credit account was updated at.