Search…
API Reference
Resources
Retrieve a billing info validation rule
How to fetch a specific billing info validation rule via API
To fetch a single billing info validation rule, send a GET request to the /api/billing_info_validation_rules/:id endpoint, where id is the ID of the resource that you want to retrieve.

Request

GET https://yourdomain.commercelayer.io/api/billing_info_validation_rules/:id

Example

Request
Response
The following request fetches the billing info validation rule identified by the id "xYZkjABcde":
1
curl -g -X GET \
2
'https://yourdomain.commercelayer.io/api/billing_info_validation_rules/xYZkjABcde' \
3
-H 'Accept: application/vnd.api+json' \
4
-H 'Authorization: Bearer your-access-token'
Copied!
On success, the API responds with a 200 OK status code, returning a single resource object:
1
{
2
"data": {
3
"id": "xYZkjABcde",
4
"type": "billing_info_validation_rules",
5
"links": {
6
"self": "https://yourdomain.commercelayer.io/api/billing_info_validation_rules/xYZkjABcde"
7
},
8
"attributes": {
9
"created_at": "2018-01-01T12:00:00.000Z",
10
"updated_at": "2018-01-01T12:00:00.000Z",
11
"reference": "ANY-EXTERNAL-REFEFERNCE",
12
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
13
"metadata": {
14
"foo": "bar"
15
}
16
},
17
"relationships": {
18
"market": {
19
"links": {
20
"self": "https://yourdomain.commercelayer.io/api/billing_info_validation_rules/xYZkjABcde/relationships/market",
21
"related": "https://yourdomain.commercelayer.io/api/billing_info_validation_rules/xYZkjABcde/market"
22
}
23
}
24
},
25
"meta": {
26
"mode": "test"
27
}
28
}
29
}
Copied!
Last modified 2mo ago
Copy link