{ "opencollection": "1.0.0", "info": { "name": "Admin Account / Address Account / Credit Cards API", "version": "v3" }, "items": [ { "info": { "name": "Account / Credit Cards", "type": "folder" }, "items": [ { "info": { "name": "List all Credit Cards", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v2/storefront/account/credit_cards", "params": [ { "name": "filter[payment_method_id]", "value": "2", "type": "query", "description": "Filter based on payment method ID" }, { "name": "include", "value": "payment_method", "type": "query", "description": "Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes)." }, { "name": "fields[credit_card]", "value": "cc_type,last_digits,month,year,name,default", "type": "query", "description": "Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets)." } ] }, "docs": "Returns a list of credit cards for the current user." }, { "info": { "name": "Remove a Credit Card", "type": "http" }, "http": { "method": "DELETE", "url": "http://{defaultHost}/api/v2/storefront/account/credit_cards/:id", "params": [ { "name": "id", "value": "", "type": "path", "description": "The ID of the `credit_card` you wish to remove." } ] }, "docs": "Removes a specified credit card for the current user with a soft delete to retain payment information for any pre-existing orders." }, { "info": { "name": "Retrieve the default Credit Card", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v2/storefront/account/credit_cards/default", "params": [ { "name": "include", "value": "payment_method", "type": "query", "description": "Specify the related resources you would like to receive in the response body. [More Information](https://jsonapi.org/format/#fetching-includes)." }, { "name": "fields[credit_card]", "value": "cc_type,last_digits,month,year,name,default", "type": "query", "description": "Specify the fields you would like returned in the response body. [More information](https://jsonapi.org/format/#fetching-sparse-fieldsets)." } ] }, "docs": "Returns the current user's default credit card." } ] } ], "bundled": true }