{"note":"OpenAPI conversion -- returning structured metadata","name":"bigcommerce-orders","description":"Orders V3","version":"unknown","base_url":"https://api.bigcommerce.com/stores/{store_hash}/v3","endpoints":21,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Orders V3\n@base https://api.bigcommerce.com/stores/{store_hash}/v3\n@auth ApiKey X-Auth-Token in header\n@endpoints 21\n@hint download_for_search\n@toc orders(21)\n\n@endpoint POST /orders/{order_id}/payment_actions/capture\n@desc Capture order payment\n@required {Content-Type: str=application/json # The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.}\n@returns(201) Resource Created.\n@errors {400: Malformed request syntax. Typically need to fix the JSON. Body to resend successfully., 404: The resource was not found., 422: This occurs when missing or unacceptable data is passed for one or more fields. Please correct the values for the fields listed in the errors object., 502: If something happens during the request that causes it to fail, a 502 response will be returned. A new request should be made; however, it could fail., 503: If this occurs, you should retry the request. If you cannot successfully make a request, please check the BigCommerce system status [here](https://status.bigcommerce.com/). A service is likely down, and you will need to make the request again when it is back up (in several hours, usually)., 504: If this occurs, you should retry the request. Typically retrying the request several times will result in a successful request; however, if you cannot successfully make a request, please check the BigCommerce system status [here](https://status.bigcommerce.com/). A service is likely down, and you will need to complete the request again when it is back up (in several hours, usually).}\n\n@endpoint POST /orders/{order_id}/payment_actions/void\n@desc Void\n@required {Content-Type: str=application/json # The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.}\n@returns(201) Resource Created.\n@errors {400: Malformed request syntax. Typically need to fix the JSON. Body to resend successfully., 404: The resource was not found., 422: This occurs when missing or unacceptable data is passed for one or more fields. Please correct the values for the fields listed in the errors object., 502: If something happens during the request that causes it to fail, a 502 response will be returned. A new request should be made; however, it could fail., 503: If this occurs, you should retry the request. If you cannot successfully make a request, please check the BigCommerce system status [here](https://status.bigcommerce.com/). A service is likely down, and you will need to make the request again when it is back up (in several hours, usually)., 504: If this occurs, you should retry the request. Typically retrying the request several times will result in a successful request; however, if you cannot successfully make a request, please check the BigCommerce system status [here](https://status.bigcommerce.com/). A service is likely down, and you will need to complete the request again when it is back up (in several hours, usually).}\n\n@endpoint GET /orders/{order_id}/transactions\n@desc Get Transactions\n@returns(200) {data: [any], meta: map{pagination: map{total: int(int32), count: int(int32), per_page: int(int32), current_page: int(int32), total_pages: int(int32), links: map{previous: str, current: str, next: str}}}} # Response payload for the BigCommerce Order Transactions API.\n@returns(204) {status: int, title: str, type: str, instance: str} # No content found to fulfill request.\n@errors {404: The resource was not found., 503: Service Unavailable.}\n\n@endpoint POST /orders/{order_id}/payment_actions/refund_quotes\n@desc Create a Refund Quote\n@required {Content-Type: str=application/json # The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.}\n@returns(201) {data: map{order_id: int, total_refund_amount: num(float), total_refund_tax_amount: num, order_level_refund_amount: num, rounding: num, adjustment: num(float), tax_inclusive: bool, refund_methods: [[map]]}, meta: map}\n@errors {422: This occurs when missing or unacceptable data is passed for one or more fields. Please correct the values for the fields listed in the errors object.}\n\n@endpoint POST /orders/{order_id}/payment_actions/refunds\n@desc Create a Refund\n@required {Content-Type: str=application/json # The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.}\n@returns(201) {data: map{id: int, order_id: int, user_id: int, created: str(date-time), reason: str, total_amount: num(float), total_tax: num, uses_merchant_override_values: bool, items: [map], payments: [map]}, meta: map}\n@errors {422: Unable to process a guest refund with store credit., 503: Service Unavailable}\n\n@endpoint GET /orders/{order_id}/payment_actions/refunds\n@desc Get Refunds for Order\n@returns(200) {data: [map], meta: map}\n\n@endpoint GET /orders/payment_actions/refunds/{refund_id}\n@desc Get a Refund\n@returns(200) {data: map{id: int, order_id: int, user_id: int, created: str(date-time), reason: str, total_amount: num, total_tax: num, uses_merchant_override_values: bool, payments: [map], items: [map]}, meta: map}\n\n@endpoint GET /orders/payment_actions/refunds\n@desc Get All Refunds\n@optional {order_id:in: [int] # Pass a comma-separated list of order IDs to filter the included orders. Accepts multiple values., id:in: [int] # Pass a comma-separated list of refund IDs to filter the included refunds. Accepts multiple values., created:min: str(date-time) # Filter results so they are later than or equal to provided date.   Must be in url-encoded RFC 3339 format. e.g. `2020-01-15T01:02:34-01:00` is RFC 3339 format. Url-encoded this will be `2020-01-15T01%3A02%3A34%2B01%3A00`, created:max: str(date-time) # Filter results so they are earlier than or equal to provided date.  Must be in url-encoded RFC 3339 format. e.g. `2020-01-15T01:02:34-01:00` is RFC 3339 format. Url-encoded this will be `2020-01-15T01%3A02%3A34%2B01%3A00`, transaction_id: str # Filters by refund payment using the BigCommerce `transaction_id`., page: int # Specifies the page number in a limited (paginated) list of items., limit: int # Controls the number of items per page in a limited (paginated) list of items.}\n@returns(200) {data: [map], meta: map}\n\n@endpoint GET /orders/{order_id}/metafields\n@desc Get Order Metafields\n@optional {page: int # Specifies the page number in a limited (paginated) list of products., limit: int # Controls the number of items per page in a limited (paginated) list of products., key: str # Filter based on a metafieldʼs key., key:in: [str] # Filter using a comma-separated list of metafield keys. Could be used with vanilla `key` query parameter., namespace: str # Filter based on a metafieldʼs key., namespace:in: [str] # Filter using a comma-separated list of metafield namespaces. Can be used with vanilla `namespace` query parameter., direction: str(asc/desc) # Sort direction. Acceptable values are: `asc`, `desc`., include_fields: [str] # Fields to include, in a comma-separated list. The ID and the specified fields will be returned., date_created: str # Filter items by date created. For example, `date_created=2019-09-04T00:00:00`. Returns metafields created on this date., date_modified: str # Filter items by date modified. For example, `date_modified=2019-09-04T00:00:00`. Returns metafields modified on this date., date_created:min: str # Filter items by minimum date created. For example, `date_created:min=2019-09-04T00:00:00` or `date_created:min=2019-09-04`. Returns metafields created after this date., date_created:max: str # Filter items by maximum date created. For example, `date_created:max=2019-09-04T00:00:00` or `date_created:max=2019-09-04`. Returns metafields created before this date., date_modified:min: str # Filter items by minimum date modified. For example, `date_modified:min=2019-09-04T00:00:00` or `date_modified:min=2019-09-04`. Returns metafields modified after this date., date_modified:max: str # Filter items by maximum date modified. For example, `date_modified:max=2019-09-04T00:00:00` or `date_modified:max=2019-09-04`. Returns metafields modified before this date., before: str # A cursor indicating where to start retrieving the previous page of results. Use this parameter to paginate backward. Not required for the initial request. For subsequent requests, use the end_cursor value returned in meta.cursor_pagination from the previous response. Works with limit, direction, and other supported query parameters. When specified, offset-based pagination (page) is ignored. Cannot be used in combination with the after parameter., after: str # A cursor indicating where to start retrieving the next page of results. Use this parameter to paginate forward. Not required for the initial request. For subsequent requests, use the start_cursor value returned in meta.cursor_pagination from the previous response. Works with limit, direction, and other supported query parameters. When specified, offset-based pagination (page) is ignored. Cannot be used in combination with the before parameter.}\n@returns(200) {data: [any], meta: map{pagination: map{total: int, count: int, per_page: int, current_page: int, total_pages: int, links: map{previous: str, current: str, next: str}}, cursor_pagination: map{count: int, per_page: int, start_cursor: str, end_cursor: str, links: map{previous: str, current: str, next: str}}}} # An array of metafields and metadata.\n\n@endpoint POST /orders/{order_id}/metafields\n@desc Create Metafields\n@required {Content-Type: str=application/json # The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body., permission_set: str(app_only/read/write/read_and_sf_access/write_and_sf_access) # Determines the visibility and writeability of the field by other API consumers.  |Value|Description | |:-|:-| |`app_only`|Private to the app that owns the field| |`read`|Visible to other API consumers| |`write`|Open for reading and writing by other API consumers| |`read_and_sf_access`|Visible to other API consumers, including on storefront| |`write_and_sf_access`|Open for reading and writing by other API consumers, including on storefront|, namespace: str # Namespace for the metafield, for organizational purposes., key: str # The name of the field, for example: `location_id`, `color`., value: str # The value of the field, for example: `1`, `blue`.}\n@optional {description: str # Description for the metafields.}\n@returns(200) {data: any, meta: map} # A `Metafield` object.\n@errors {400: Bad Request. Input is invalid., 409: The metafield conflicts with another metafield. This can result from duplicate unique key combinations of the appʼs client ID, namespace, key, resource type, and resource ID., 422: The `Metafield` is not valid. This is the result of missing required fields or of invalid data. See the response for more details.}\n@example_request {\"permission_set\":\"app_only\",\"namespace\":\"Sales Department\",\"key\":\"Staff Name\",\"value\":\"Sam\",\"description\":\"Name of staff member\"}\n\n@endpoint GET /orders/{order_id}/metafields/{metafield_id}\n@desc Get a Metafield\n@returns(200) {data: any, meta: map} # A `Metafield` object.\n@errors {404: A metafield was not found with this query.}\n\n@endpoint PUT /orders/{order_id}/metafields/{metafield_id}\n@desc Update a Metafield\n@required {Content-Type: str=application/json # The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.}\n@returns(200) {data: any, meta: map} # A metafield and metadata.\n@errors {400: Bad Request. Input is invalid., 404: A metafield was not found with this query.}\n\n@endpoint DELETE /orders/{order_id}/metafields/{metafield_id}\n@desc Delete a Metafield\n@returns(204) An empty response.\n@errors {404: The resource was not found.}\n\n@endpoint GET /orders/settings\n@desc Get Global Order Settings\n@returns(200) OK\n@errors {400: Bad request. Authentication Required.}\n\n@endpoint PUT /orders/settings\n@desc Update Global Order Settings\n@required {Content-Type: str=application/json # The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.}\n@optional {notifications: map{order_placed: map, forward_invoice: map} # Global notification settings.}\n@returns(200) OK\n@errors {400: Bad request. Authentication Required., 422: Order settings data is not valid. This is the result of missing required fields, or of invalid data. See the response for more details.}\n@example_request {\"notifications\":{\"order_placed\":{\"email_addresses\":[\"admin@example.com\",\"another-email@example.com\"]},\"forward_invoice\":{\"email_addresses\":[\"admin@example.com\",\"another-email@example.com\"]}}}\n\n@endpoint GET /orders/settings/channels/{channel_id}\n@desc Get Channel Order Settings\n@returns(200) OK\n@errors {400: Bad request. Authentication Required.}\n\n@endpoint PUT /orders/settings/channels/{channel_id}\n@desc Update Channel Order Settings\n@required {Content-Type: str=application/json # The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.}\n@optional {notifications: map{order_placed: map, forward_invoice: map} # Channel notification settings.}\n@returns(200) OK\n@errors {400: Bad request. Authentication Required., 422: Order settings data is not valid. This is the result of missing required fields, or of invalid data. See the response for more details.}\n@example_request {\"notifications\":{\"order_placed\":{\"email_addresses\":[\"admin@example.com\",\"another-email@example.com\"]},\"forward_invoice\":{\"email_addresses\":[]}}}\n\n@endpoint GET /orders/metafields\n@desc Get All Order Metafields\n@optional {page: int # Specifies the page number in a limited (paginated) list of products., limit: int # Controls the number of items per page in a limited (paginated) list of products., key: str # Filter based on a metafieldʼs key., key:in: [str] # Filter using a comma-separated list of metafield keys. Could be used with vanilla `key` query parameter., namespace: str # Filter based on a metafieldʼs key., namespace:in: [str] # Filter using a comma-separated list of metafield namespaces. Can be used with vanilla `namespace` query parameter., direction: str(asc/desc) # Sort direction. Acceptable values are: `asc`, `desc`., include_fields: [str] # Fields to include, in a comma-separated list. The ID and the specified fields will be returned., date_created: str # Filter items by date created. For example, `date_created=2019-09-04T00:00:00`. Returns metafields created on this date., date_modified: str # Filter items by date modified. For example, `date_modified=2019-09-04T00:00:00`. Returns metafields modified on this date., date_created:min: str # Filter items by minimum date created. For example, `date_created:min=2019-09-04T00:00:00` or `date_created:min=2019-09-04`. Returns metafields created after this date., date_created:max: str # Filter items by maximum date created. For example, `date_created:max=2019-09-04T00:00:00` or `date_created:max=2019-09-04`. Returns metafields created before this date., date_modified:min: str # Filter items by minimum date modified. For example, `date_modified:min=2019-09-04T00:00:00` or `date_modified:min=2019-09-04`. Returns metafields modified after this date., date_modified:max: str # Filter items by maximum date modified. For example, `date_modified:max=2019-09-04T00:00:00` or `date_modified:max=2019-09-04`. Returns metafields modified before this date., before: str # A cursor indicating where to start retrieving the previous page of results. Use this parameter to paginate backward. Not required for the initial request. For subsequent requests, use the end_cursor value returned in meta.cursor_pagination from the previous response. Works with limit, direction, and other supported query parameters. When specified, offset-based pagination (page) is ignored. Cannot be used in combination with the after parameter., after: str # A cursor indicating where to start retrieving the next page of results. Use this parameter to paginate forward. Not required for the initial request. For subsequent requests, use the start_cursor value returned in meta.cursor_pagination from the previous response. Works with limit, direction, and other supported query parameters. When specified, offset-based pagination (page) is ignored. Cannot be used in combination with the before parameter.}\n@returns(200) {data: [any], meta: map{pagination: map{total: int, count: int, per_page: int, current_page: int, total_pages: int, links: map{previous: str, current: str, next: str}}, cursor_pagination: map{count: int, per_page: int, start_cursor: str, end_cursor: str, links: map{previous: str, current: str, next: str}}}} # List of `Metafield` objects.\n\n@endpoint POST /orders/metafields\n@desc Create multiple Metafields\n@returns(200) {data: [any], errors: [any], meta: map{total: int, success: int, failed: int}} # List of created `Metafield` objects.\n@errors {400: Bad Request. Input is invalid., 422: Response object for metafields creation with partial success.}\n\n@endpoint PUT /orders/metafields\n@desc Update multiple Metafields\n@returns(200) {data: [any], errors: [any], meta: map{total: int, success: int, failed: int}} # List of updated `Metafield` objects.\n@errors {400: Bad Request. Input is invalid., 422: Response object for metafields creation with partial success.}\n\n@endpoint DELETE /orders/metafields\n@desc Delete Multiple Metafields\n@returns(200) {data: [int], errors: [any], meta: map{total: int, success: int, failed: int}} # Response object for metafields deletion with success.\n@errors {400: Bad Request. Input is invalid., 422: Response object for metafields deletion with partial success.}\n\n@end\n"}