Skip to content

Commit fa1ed02

Browse files
committed
docs: update API reference for the loyalty plugin
1 parent bb1d08e commit fa1ed02

78 files changed

Lines changed: 1019 additions & 2654 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

www/apps/api-reference/specs/admin/code_samples/Shell/admin_gift-cards_{id}_redeem/post.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
curl -X POST '{backend_url}/admin/store-credit-accounts/{id}/credit' \
2+
-H 'Authorization: Bearer {access_token}' \
3+
-H 'Content-Type: application/json' \
4+
--data-raw '{
5+
"amount": 0
6+
}'

www/apps/api-reference/specs/admin/code_samples/Shell/admin_transaction-groups/get.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

www/apps/api-reference/specs/admin/components/schemas/AdminCreateStoreCreditAccount.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ description: The details of the store credit account to create.
33
x-schemaName: AdminCreateStoreCreditAccount
44
required:
55
- currency_code
6-
- customer_id
76
properties:
87
currency_code:
98
type: string
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
type: object
2+
description: The details of the credits to add to the store credit account.
3+
x-schemaName: AdminCreditStoreCreditAccountParams
4+
required:
5+
- amount
6+
properties:
7+
amount:
8+
type: number
9+
title: amount
10+
description: The credits to add to the store credit account.
11+
note:
12+
type: string
13+
title: note
14+
description: An internal note with more details on the credit addition.

www/apps/api-reference/specs/admin/components/schemas/AdminRedeemGiftCard.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

www/apps/api-reference/specs/admin/components/schemas/AdminStoreCreditAccount.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ description: The store credit account's details.
33
x-schemaName: AdminStoreCreditAccount
44
required:
55
- customer
6-
- transaction_groups
76
- id
8-
- customer_id
97
- currency_code
108
- credits
119
- debits
@@ -41,11 +39,6 @@ properties:
4139
type: number
4240
title: balance
4341
description: The account's balance.
44-
transaction_groups:
45-
type: array
46-
description: The store credit account's transaction groups.
47-
items:
48-
$ref: ./AdminTransactionGroup.yaml
4942
metadata:
5043
type: object
5144
description: The store credit account's metadata, can hold custom key-value pairs.
@@ -62,3 +55,7 @@ properties:
6255
format: date-time
6356
title: updated_at
6457
description: The date the store credit account was updated at.
58+
code:
59+
type: string
60+
title: code
61+
description: The store credit account's code.

www/apps/api-reference/specs/admin/components/schemas/AdminTransaction.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ required:
55
- account
66
- id
77
- account_id
8-
- transaction_group_id
98
- type
109
- amount
1110
- metadata
@@ -20,10 +19,6 @@ properties:
2019
type: string
2120
title: account_id
2221
description: The ID of the store credit account that the transaction belongs to.
23-
transaction_group_id:
24-
type: string
25-
title: transaction_group_id
26-
description: The ID of the transaction group that the transaction belongs to.
2722
type:
2823
type: string
2924
description: The transaction's type.

www/apps/api-reference/specs/admin/components/schemas/AdminTransactionGroupsResponse.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
type: object
2+
description: The details of claiming the credit.
3+
x-schemaName: StoreClaimStoreCreditAccountParams
4+
required:
5+
- code
6+
properties:
7+
code:
8+
type: string
9+
title: code
10+
description: The code of the store credit account to claim.

0 commit comments

Comments
 (0)