@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Jumpseller API
@base https://api.jumpseller.com/v1
@version 1.0.0
@auth Bearer basic | ApiKey login in query | ApiKey authtoken in query | ApiKey auth_token in query | OAuth2
@endpoints 179
@hint download_for_search
@toc store(3), hooks.json(2), hooks(3), jsapps.json(2), jsapps(2), apps(5), products.json(2), products(51), categories.json(2), categories(4), orders.json(2), orders(12), fulfillments(5), fulfillments.json(2), order(1), pages.json(2), pages(10), customers.json(2), customers(13), customer_categories.json(2), customer_categories(6), promotions.json(2), promotions(3), payment_methods.json(2), payment_methods(1), shipping_methods.json(2), shipping_methods(3), locations.json(2), locations(3), custom_fields.json(2), custom_fields(8), checkout_custom_fields.json(2), checkout_custom_fields(3), countries.json(1), countries(4), taxes.json(2), taxes(1), carts(1), documents.json(1), transaction_ledger(1), products_locations(2)

@group store
@endpoint GET /store/info.json
@returns(200) {name: str, code: str, currency: str, country: str, timezone: str, email: str, hooks_token: str, url: str, logo: str, weight_unit: str, subscription_status: str, subscription_plan: str, fb_pixel_id: str, address: map{address: str, city: str, postal: str, region: str, country: str, region_code: str, country_code: str}, whatsapp_phone: str}

@endpoint GET /store/languages.json
@returns(200)

@endgroup

@group hooks.json
@endpoint GET /hooks.json
@optional {limit: int(integer)=50, page: int(integer)=1}
@returns(200)

@endpoint POST /hooks.json
@optional {hook: map{event!: str, url!: str}}
@returns(200) {hook: map{id: int(int32), name: str, event: str, url: str, created_at: str}}
@errors {404}

@endgroup

@group hooks
@endpoint GET /hooks/{id}.json
@required {id: int(int32)}
@returns(200) {hook: map{id: int(int32), name: str, event: str, url: str, created_at: str}}
@errors {404}

@endpoint PUT /hooks/{id}.json
@required {id: int(int32)}
@optional {hook: map{event!: str, url!: str}}
@returns(200) {hook: map{id: int(int32), name: str, event: str, url: str, created_at: str}}
@errors {404}

@endpoint DELETE /hooks/{id}.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endgroup

@group jsapps.json
@endpoint GET /jsapps.json
@returns(200)
@errors {404}

@endpoint POST /jsapps.json
@required {app: map{url!: str, template!: str, element!: str}}
@returns(200) {js_app: map{id: int(int32), url: str, template: str, element: str, application_id: int(int32)}}
@errors {400}

@endgroup

@group jsapps
@endpoint GET /jsapps/{code}.json
@required {code: str}
@returns(200)
@errors {403, 404}

@endpoint DELETE /jsapps/{id}.json
@required {id: int(int32)}
@returns(200) {message: str}
@errors {403, 404}

@endgroup

@group apps
@endpoint GET /apps/{code}/install_status.json
@required {code: str}
@returns(200) {app_code: str, store_id: int, installed: bool, subscription_plan: str, subscription_status: str, code: str}

@endpoint GET /apps/{code}/install_status_by_store_id.json
@required {code: str, store_id: int}
@returns(200) {app_code: str, store_id: int, installed: bool, subscription_plan: str, subscription_status: str, code: str}

@endpoint GET /apps/{code}/billing_cycle_dates.json
@required {code: str}
@optional {date: str}
@returns(200) {billing_start: str, billing_end: str}

@endpoint GET /apps/{code}/billing_cycle_orders.json
@required {code: str}
@optional {date: str}
@returns(200) {billable_orders: [map], free_orders: [map]}

@endpoint GET /apps/{code}/check_billing_cycle_order.json
@required {code: str}
@optional {date: str}
@returns(200) {billing_start: str, billing_end: str, paid: bool}

@endgroup

@group products.json
@endpoint GET /products.json
@optional {limit: int(integer)=50, page: int(integer)=1, locale: str(string)}
@returns(200)

@endpoint POST /products.json
@optional {locale: str(string), product: map{name!: str, description: str, page_title: str, meta_description: str, type: str, days_to_expire: int(int32), price!: num(float), weight: num(float), stock: int(int32), stock_unlimited: bool, stock_threshold: int(int32), stock_notification: bool, back_in_stock_enabled: bool, cost_per_item: num, compare_at_price: num, minimum_quantity: num, maximum_quantity: num, sku: str, barcode: str, google_product_category_text: str, quotable: bool, featured: bool, shipping_required: bool, status: str, package_format: str, length: num(float), width: num(float), height: num(float), diameter: num(float), categories: [map], variants: [map]}}
@returns(200) {product: map{id: int(int32), name: str, page_title: str, description: str, type: str, days_to_expire: int(int32), price: num(float), discount: num(float), weight: num(float), stock: int(int32), stock_unlimited: bool, stock_threshold: int(int32), stock_notification: bool, back_in_stock_enabled: bool, cost_per_item: num, compare_at_price: num, sku: str, brand: str, barcode: str, google_product_category_text: str, quotable: bool, featured: bool, reviews_enabled: bool, status: str, created_at: str, updated_at: str, package_format: str, length: num(float), width: num(float), height: num(float), diameter: num(float), permalink: str, categories: [map], images: [map], variants: [map], digital_products: [map]}}

@endgroup

@group products
@endpoint GET /products/count.json
@returns(200) {count: int(int32)}

@endpoint GET /products/after/{id}.json
@required {id: int(int32)}
@optional {locale: str(string)}
@returns(200)
@errors {404}

@endpoint GET /products/status/{status}.json
@required {status: str(available/not-available/disabled)}
@optional {locale: str(string)}
@returns(200)
@errors {404}

@endpoint GET /products/category/{category_id}.json
@required {category_id: int(int32)}
@optional {locale: str(string)}
@returns(200)
@errors {404}

@endpoint GET /products/status/{status}/count.json
@required {status: str(available/not-available/disabled)}
@optional {locale: str(string)}
@returns(200) {count: int(int32)}
@errors {404}

@endpoint GET /products/category/{category_id}/count.json
@required {category_id: int(int32)}
@optional {locale: str(string)}
@returns(200) {count: int(int32)}
@errors {404}

@endpoint GET /products/{id}/reviews.json
@required {id: int(int32)}
@optional {limit: int(integer)=50, page: int(integer)=1}
@returns(200)
@errors {404}

@endpoint GET /products/reviews/{review_id}.json
@required {review_id: int}
@returns(200) {review: map{id: int, status: str, rating: int, review: str, date: str, product_id: int, product_name: str, order_id: int, customer_email: str(email)}}
@errors {404}

@endpoint GET /products/reviews.json
@optional {limit: int(integer)=50, page: int(integer)=1}
@returns(200)

@endpoint GET /products/{id}.json
@required {id: int(int32)}
@optional {locale: str(string)}
@returns(200) {product: map{id: int(int32), name: str, page_title: str, description: str, type: str, days_to_expire: int(int32), price: num(float), discount: num(float), weight: num(float), stock: int(int32), stock_unlimited: bool, stock_threshold: int(int32), stock_notification: bool, back_in_stock_enabled: bool, cost_per_item: num, compare_at_price: num, sku: str, brand: str, barcode: str, google_product_category_text: str, quotable: bool, featured: bool, reviews_enabled: bool, status: str, created_at: str, updated_at: str, package_format: str, length: num(float), width: num(float), height: num(float), diameter: num(float), permalink: str, categories: [map], images: [map], variants: [map], digital_products: [map]}}
@errors {404}

@endpoint PUT /products/{id}.json
@required {id: int(int32)}
@optional {locale: str(string), product: map{name!: str, description: str, page_title: str, meta_description: str, type: str, days_to_expire: int(int32), price!: num(float), weight: num(float), stock: int(int32), stock_unlimited: bool, stock_threshold: int(int32), stock_notification: bool, back_in_stock_enabled: bool, cost_per_item: num, compare_at_price: num, minimum_quantity: num, maximum_quantity: num, sku: str, barcode: str, google_product_category_text: str, quotable: bool, featured: bool, shipping_required: bool, status: str, package_format: str, length: num(float), width: num(float), height: num(float), diameter: num(float), permalink: str, categories: [map], variants: [map]}}
@returns(200) {product: map{id: int(int32), name: str, page_title: str, description: str, type: str, days_to_expire: int(int32), price: num(float), discount: num(float), weight: num(float), stock: int(int32), stock_unlimited: bool, stock_threshold: int(int32), stock_notification: bool, back_in_stock_enabled: bool, cost_per_item: num, compare_at_price: num, sku: str, brand: str, barcode: str, google_product_category_text: str, quotable: bool, featured: bool, reviews_enabled: bool, status: str, created_at: str, updated_at: str, package_format: str, length: num(float), width: num(float), height: num(float), diameter: num(float), permalink: str, categories: [map], images: [map], variants: [map], digital_products: [map]}}
@errors {404}

@endpoint DELETE /products/{id}.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint GET /products/search.json
@required {query: str(string)}
@optional {locale: str(string), fields: str(string)(sku/barcode/brand/name/description/variants/option_name/custom_fields/custom_fields_selects), status: str(string)(available/not-available/disabled/featured), categories: str(string)}
@returns(200)
@errors {404}

@endpoint GET /products/{id}/options.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint POST /products/{id}/options.json
@required {id: int(int32)}
@optional {option: map{name: str, position: int(int32), option_type: str, addon_price: num(float)}}
@returns(200) {option: map{id: int(int32), name: str, position: int(int32), option_type: str, addon_price: num(float)?, values: [map]}}

@endpoint GET /products/{id}/options/count.json
@required {id: int(int32)}
@returns(200) {count: int(int32)}
@errors {404}

@endpoint GET /products/{id}/options/{option_id}.json
@required {id: int(int32), option_id: int(int32)}
@returns(200) {option: map{id: int(int32), name: str, position: int(int32), option_type: str, addon_price: num(float)?, values: [map]}}
@errors {404}

@endpoint PUT /products/{id}/options/{option_id}.json
@required {id: int(int32), option_id: int(int32)}
@optional {option: map{name: str, position: int(int32), option_type: str, addon_price: num(float)}}
@returns(200) {option: map{id: int(int32), name: str, position: int(int32), option_type: str, addon_price: num(float)?, values: [map]}}
@errors {404}

@endpoint DELETE /products/{id}/options/{option_id}.json
@required {id: int(int32), option_id: int(int32)}
@returns(200)
@errors {404}

@endpoint GET /products/{id}/options/{option_id}/values.json
@required {id: int(int32), option_id: int(int32)}
@returns(200)
@errors {404}

@endpoint POST /products/{id}/options/{option_id}/values.json
@required {id: int(int32), option_id: int(int32)}
@optional {value: map{name: str, position: int(int32), custom: str}}
@returns(200) {value: map{id: int(int32), name: str, custom: str, position: int(int32), product_option: map{option: map{id: int(int32), name: str, position: int(int32), option_type: str, addon_price: num(float)?, values: [map]}}, variants: [map]}}

@endpoint GET /products/{id}/options/{option_id}/values/count.json
@required {id: int(int32), option_id: int(int32)}
@returns(200) {count: int(int32)}
@errors {404}

@endpoint GET /products/{id}/options/{option_id}/values/{value_id}.json
@required {id: int(int32), option_id: int(int32), value_id: int(int32)}
@returns(200) {value: map{id: int(int32), name: str, custom: str, position: int(int32), product_option: map{option: map{id: int(int32), name: str, position: int(int32), option_type: str, addon_price: num(float)?, values: [map]}}, variants: [map]}}
@errors {404}

@endpoint PUT /products/{id}/options/{option_id}/values/{value_id}.json
@required {id: int(int32), option_id: int(int32), value_id: int(int32)}
@optional {value: map{name: str, position: int(int32), custom: str}}
@returns(200) {value: map{id: int(int32), name: str, custom: str, position: int(int32), product_option: map{option: map{id: int(int32), name: str, position: int(int32), option_type: str, addon_price: num(float)?, values: [map]}}, variants: [map]}}
@errors {404}

@endpoint DELETE /products/{id}/options/{option_id}/values/{value_id}.json
@required {id: int(int32), option_id: int(int32), value_id: int(int32)}
@returns(200)
@errors {404}

@endpoint GET /products/{id}/variants/{variant_id}.json
@required {id: int(int32), variant_id: int(int32)}
@returns(200) {variant: map{id: int(int32), price: num(float), sku: str, barcode: str, stock: int(int32), stock_unlimited: bool, stock_threshold: int(int32), stock_notification: bool, cost_per_item: num, compare_at_price: num, options: [map], image: map{id: int(int32), position: int(int32), url: str}}}
@errors {404}

@endpoint PUT /products/{id}/variants/{variant_id}.json
@required {id: int(int32), variant_id: int(int32)}
@optional {variant: map{price: num(float), sku: str, barcode: str, stock: int(int32), stock_unlimited: bool, stock_threshold: int(int32), stock_notification: bool, cost_per_item: num, compare_at_price: num, image_id: int(int32), options: [map]}}
@returns(200) {variant: map{id: int(int32), price: num(float), sku: str, barcode: str, stock: int(int32), stock_unlimited: bool, stock_threshold: int(int32), stock_notification: bool, cost_per_item: num, compare_at_price: num, options: [map], image: map{id: int(int32), position: int(int32), url: str}}}
@errors {404}

@endpoint GET /products/{id}/variants.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint POST /products/{id}/variants.json
@required {id: int(int32)}
@optional {variant: map{price: num(float), sku: str, barcode: str, stock: int(int32), stock_unlimited: bool, stock_threshold: int(int32), stock_notification: bool, cost_per_item: num, compare_at_price: num, image_id: int(int32), options: [map]}}
@returns(200) {variant: map{id: int(int32), price: num(float), sku: str, barcode: str, stock: int(int32), stock_unlimited: bool, stock_threshold: int(int32), stock_notification: bool, cost_per_item: num, compare_at_price: num, options: [map], image: map{id: int(int32), position: int(int32), url: str}}}
@errors {404}

@endpoint GET /products/{id}/variants/count.json
@required {id: int(int32)}
@returns(200) {count: int(int32)}
@errors {404}

@endpoint GET /products/{id}/images.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint POST /products/{id}/images.json
@required {id: int(int32)}
@optional {image: map{url: str, position: int(int32)}}
@returns(200) {image: map{id: int(int32), position: int(int32), url: str}}

@endpoint PUT /products/{product_id}/images/{image_id}.json
@required {id: int(int32), image_id: int(int32), position: int(int32)}
@returns(200) {image: map{id: int(int32), position: int(int32), url: str}}
@errors {404}

@endpoint GET /products/{id}/images/count.json
@required {id: int(int32)}
@returns(200) {count: int(int32)}
@errors {404}

@endpoint GET /products/{id}/images/{image_id}.json
@required {id: int(int32), image_id: int(int32)}
@returns(200) {image: map{id: int(int32), position: int(int32), url: str}}
@errors {404}

@endpoint DELETE /products/{id}/images/{image_id}.json
@required {id: int(int32), image_id: int(int32)}
@returns(200)
@errors {404}

@endpoint GET /products/{id}/attachments.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint POST /products/{id}/attachments.json
@required {id: int(int32)}
@optional {attachment: map{filename: str, url: str}}
@returns(200) {attachment: map{id: int(int32), url: str}}

@endpoint GET /products/{id}/attachments/count.json
@required {id: int(int32)}
@returns(200) {count: int(int32)}
@errors {404}

@endpoint GET /products/{id}/attachments/{attachment_id}.json
@required {id: int(int32), attachment_id: int(int32)}
@returns(200) {attachment: map{id: int(int32), url: str}}
@errors {404}

@endpoint DELETE /products/{id}/attachments/{attachment_id}.json
@required {id: int(int32), attachment_id: int(int32)}
@returns(200)
@errors {404}

@endpoint GET /products/{id}/digital_products.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint POST /products/{id}/digital_products.json
@required {id: int(int32)}
@optional {digital_product: map{filename: str, url: str, external: bool}}
@returns(200) {digital_product: map{id: int(int32), url: str, expiration_seconds: int(int32), external: bool}}

@endpoint GET /products/{id}/digital_products/count.json
@required {id: int(int32)}
@returns(200) {count: int(int32)}
@errors {404}

@endpoint GET /products/{id}/digital_products/{digital_product_id}.json
@required {id: int(int32), digital_product_id: int(int32)}
@optional {external: str}
@returns(200) {digital_product: map{id: int(int32), url: str, expiration_seconds: int(int32), external: bool}}
@errors {404}

@endpoint DELETE /products/{id}/digital_products/{digital_product_id}.json
@required {id: int(int32), digital_product_id: int(int32)}
@optional {external: bool=false}
@returns(200)
@errors {404}

@endpoint GET /products/{id}/fields.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint POST /products/{id}/fields.json
@required {id: int(int32)}
@optional {field: map{id: int(int32), value: str, variants: [int]}}
@returns(200) {product: map{id: int(int32), name: str, page_title: str, description: str, type: str, days_to_expire: int(int32), price: num(float), discount: num(float), weight: num(float), stock: int(int32), stock_unlimited: bool, stock_threshold: int(int32), stock_notification: bool, back_in_stock_enabled: bool, cost_per_item: num, compare_at_price: num, sku: str, brand: str, barcode: str, google_product_category_text: str, quotable: bool, featured: bool, reviews_enabled: bool, status: str, created_at: str, updated_at: str, package_format: str, length: num(float), width: num(float), height: num(float), diameter: num(float), permalink: str, categories: [map], images: [map], variants: [map], digital_products: [map]}}
@errors {404}

@endpoint GET /products/{id}/fields/count.json
@required {id: int(int32)}
@returns(200) {count: int(int32)}
@errors {404}

@endpoint PUT /products/{product_id}/fields/{field_id}.json
@required {product_id: int(int32), field_id: int(int32), field: map{value!: str}}
@returns(200) {field: map{id: int(int32), custom_field_id: int(int32), type: str, label: str, value: str, value_id: str, variant_id: int(int32)}}
@errors {404}

@endpoint DELETE /products/{product_id}/fields/{field_id}.json
@required {product_id: int(int32), field_id: int(int32)}
@returns(200) {message: str}
@errors {404}

@endgroup

@group categories.json
@endpoint GET /categories.json
@optional {fields: str(string)}
@returns(200) {category: map{id: int(int32), name: str, parent_id: int(int32), permalink: str}}

@endpoint POST /categories.json
@optional {category: map{name: str, parent_id: int(int32)}}
@returns(200) {category: map{id: int(int32), name: str, parent_id: int(int32), permalink: str}}

@endgroup

@group categories
@endpoint GET /categories/count.json
@returns(200) {count: int(int32)}

@endpoint GET /categories/{id}.json
@required {id: int(int32)}
@optional {fields: str(string)}
@returns(200) {category: map{id: int(int32), name: str, parent_id: int(int32), permalink: str}}
@errors {404}

@endpoint PUT /categories/{id}.json
@required {id: int(int32)}
@optional {category: map{name: str, parent_id: int(int32)}}
@returns(200) {category: map{id: int(int32), name: str, parent_id: int(int32), permalink: str}}
@errors {404}

@endpoint DELETE /categories/{id}.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endgroup

@group orders.json
@endpoint GET /orders.json
@optional {locale: str(string), status_filters[]: str(string)(paid/created/pending_payment/canceled/abandoned), fulfillment_filters: str(string)(unfulfilled/fulfilled), dateFilter: str(string)(today/yesterday/last30days/last7days/last90days/customDate), initialDate: str(string), finalDate: str(string), fields: str(string)(id/tax/...), limit: int(integer)=50, page: int(integer)=1}
@returns(200)

@endpoint POST /orders.json
@optional {locale: str(string), order: map{status: str, shipping_method_id: int(int32), shipping_method_name: str, shipping_price: num(float), shipping_required: bool, allow_missing_products: bool, customer: map, products: [map], billing_information: map}}
@returns(200) {order: map{id: int(int32), source: map{created_from: str, created_from_app_code: str, source_name: str, medium: str, campaign: str, referral_url: str, referral_code: str, user_agent: str, first_page_visited: str, first_page_visited_at: str, referral_source: str}, created_at: str, completed_at: str, currency: str, subtotal: num(float), tax: num(float), shipping_tax: num(float), shipping: num(float), shipping_required: bool, total: num(float), discount: num(float), shipping_discount: num(float), gift_cards_discount: num(float), fulfillment_status: str, shipping_method_id: int(int32), shipping_service_id: int(int32), shipping_method_name: str, payment_method_name: str, payment_method_type: str, payment_information: str, payment_notification_id: str, additional_information: str, duplicate_url: str, recovery_url: str, review_url: str, checkout_url: str, coupons: str, promotions: [any], customer: map{id: int(int32), email: str, phone: str, phone_prefix: str, ip: str, fullname: str}, shipping_branch: map{id: int(int32), name: str}, shipping_address: map{name: str, surname: str, address: str, city: str, postal: str, region: str, country: str, country_code: str, region_code: str, street_number: num, complement: str, latitude: num, longitude: num, municipality: str, neighbourhood: str}, billing_address: map{name: str, surname: str, taxid: str, address: str, city: str, postal: str, region: str, country: str, country_code: str, region_code: str, street_number: num, complement: str, municipality: str, neighbourhood: str}, pickup_address: map{name: str, surname: str, address: str, city: str, postal: str, region: str, country: str, country_code: str, region_code: str, street_number: num, complement: str, municipality: str, pickup_place_name: str}, products: [map], additional_fields: [map], shipping_taxes: [map], status: str, status_name: str, status_enum: str, tracking_url: str, tracking_company: str, tracking_number: str, shipping_option: str, same_day_delivery: bool, shipment_status: str, shipment_status_enum: str, recovered_from: int(int32), external_shipping_rate_id: str, external_shipping_rate_description: str, billing_information: map{business_activity: str, company_name: str, taxpayer_type: str}}}

@endgroup

@group orders
@endpoint GET /orders/count.json
@returns(200) {count: int(int32)}

@endpoint GET /orders/status/{status}.json
@required {status: str(abandoned/canceled/pending_payment/paid)}
@returns(200)
@errors {404}

@endpoint GET /orders/{id}.json
@required {id: int(int32)}
@returns(200) {order: map{id: int(int32), source: map{created_from: str, created_from_app_code: str, source_name: str, medium: str, campaign: str, referral_url: str, referral_code: str, user_agent: str, first_page_visited: str, first_page_visited_at: str, referral_source: str}, created_at: str, completed_at: str, currency: str, subtotal: num(float), tax: num(float), shipping_tax: num(float), shipping: num(float), shipping_required: bool, total: num(float), discount: num(float), shipping_discount: num(float), gift_cards_discount: num(float), fulfillment_status: str, shipping_method_id: int(int32), shipping_service_id: int(int32), shipping_method_name: str, payment_method_name: str, payment_method_type: str, payment_information: str, payment_notification_id: str, additional_information: str, duplicate_url: str, recovery_url: str, review_url: str, checkout_url: str, coupons: str, promotions: [any], customer: map{id: int(int32), email: str, phone: str, phone_prefix: str, ip: str, fullname: str}, shipping_branch: map{id: int(int32), name: str}, shipping_address: map{name: str, surname: str, address: str, city: str, postal: str, region: str, country: str, country_code: str, region_code: str, street_number: num, complement: str, latitude: num, longitude: num, municipality: str, neighbourhood: str}, billing_address: map{name: str, surname: str, taxid: str, address: str, city: str, postal: str, region: str, country: str, country_code: str, region_code: str, street_number: num, complement: str, municipality: str, neighbourhood: str}, pickup_address: map{name: str, surname: str, address: str, city: str, postal: str, region: str, country: str, country_code: str, region_code: str, street_number: num, complement: str, municipality: str, pickup_place_name: str}, products: [map], additional_fields: [map], shipping_taxes: [map], status: str, status_name: str, status_enum: str, tracking_url: str, tracking_company: str, tracking_number: str, shipping_option: str, same_day_delivery: bool, shipment_status: str, shipment_status_enum: str, recovered_from: int(int32), external_shipping_rate_id: str, external_shipping_rate_description: str, billing_information: map{business_activity: str, company_name: str, taxpayer_type: str}}}
@errors {404}

@endpoint PUT /orders/{id}.json
@required {id: int(int32)}
@optional {order: map{status: str, shipment_status: str, tracking_number: str, tracking_company: str, tracking_url: str, additional_information: str, additional_fields: [map]}}
@returns(200) {order: map{id: int(int32), source: map{created_from: str, created_from_app_code: str, source_name: str, medium: str, campaign: str, referral_url: str, referral_code: str, user_agent: str, first_page_visited: str, first_page_visited_at: str, referral_source: str}, created_at: str, completed_at: str, currency: str, subtotal: num(float), tax: num(float), shipping_tax: num(float), shipping: num(float), shipping_required: bool, total: num(float), discount: num(float), shipping_discount: num(float), gift_cards_discount: num(float), fulfillment_status: str, shipping_method_id: int(int32), shipping_service_id: int(int32), shipping_method_name: str, payment_method_name: str, payment_method_type: str, payment_information: str, payment_notification_id: str, additional_information: str, duplicate_url: str, recovery_url: str, review_url: str, checkout_url: str, coupons: str, promotions: [any], customer: map{id: int(int32), email: str, phone: str, phone_prefix: str, ip: str, fullname: str}, shipping_branch: map{id: int(int32), name: str}, shipping_address: map{name: str, surname: str, address: str, city: str, postal: str, region: str, country: str, country_code: str, region_code: str, street_number: num, complement: str, latitude: num, longitude: num, municipality: str, neighbourhood: str}, billing_address: map{name: str, surname: str, taxid: str, address: str, city: str, postal: str, region: str, country: str, country_code: str, region_code: str, street_number: num, complement: str, municipality: str, neighbourhood: str}, pickup_address: map{name: str, surname: str, address: str, city: str, postal: str, region: str, country: str, country_code: str, region_code: str, street_number: num, complement: str, municipality: str, pickup_place_name: str}, products: [map], additional_fields: [map], shipping_taxes: [map], status: str, status_name: str, status_enum: str, tracking_url: str, tracking_company: str, tracking_number: str, shipping_option: str, same_day_delivery: bool, shipment_status: str, shipment_status_enum: str, recovered_from: int(int32), external_shipping_rate_id: str, external_shipping_rate_description: str, billing_information: map{business_activity: str, company_name: str, taxpayer_type: str}}}
@errors {404}

@endpoint GET /orders/search.json
@optional {locale: str(string), query: str(string), status_filters[]: str(string)(paid/created/pending_payment/canceled/abandoned), fulfillment_filters: str(string)(unfulfilled/fulfilled), dateFilter: str(string)(today/yesterday/last30days/last7days/last90days/customDate), initialDate: str(string), finalDate: str(string), fields: str(string)(id/tax/...), limit: int(integer)=50, page: int(integer)=1}
@returns(200) {orders: [map], count: int}
@errors {404}

@endpoint GET /orders/after/{id}.json
@required {id: int(int32)}
@returns(200) {order: map{id: int(int32), source: map{created_from: str, created_from_app_code: str, source_name: str, medium: str, campaign: str, referral_url: str, referral_code: str, user_agent: str, first_page_visited: str, first_page_visited_at: str, referral_source: str}, created_at: str, completed_at: str, currency: str, subtotal: num(float), tax: num(float), shipping_tax: num(float), shipping: num(float), shipping_required: bool, total: num(float), discount: num(float), shipping_discount: num(float), gift_cards_discount: num(float), fulfillment_status: str, shipping_method_id: int(int32), shipping_service_id: int(int32), shipping_method_name: str, payment_method_name: str, payment_method_type: str, payment_information: str, payment_notification_id: str, additional_information: str, duplicate_url: str, recovery_url: str, review_url: str, checkout_url: str, coupons: str, promotions: [any], customer: map{id: int(int32), email: str, phone: str, phone_prefix: str, ip: str, fullname: str}, shipping_branch: map{id: int(int32), name: str}, shipping_address: map{name: str, surname: str, address: str, city: str, postal: str, region: str, country: str, country_code: str, region_code: str, street_number: num, complement: str, latitude: num, longitude: num, municipality: str, neighbourhood: str}, billing_address: map{name: str, surname: str, taxid: str, address: str, city: str, postal: str, region: str, country: str, country_code: str, region_code: str, street_number: num, complement: str, municipality: str, neighbourhood: str}, pickup_address: map{name: str, surname: str, address: str, city: str, postal: str, region: str, country: str, country_code: str, region_code: str, street_number: num, complement: str, municipality: str, pickup_place_name: str}, products: [map], additional_fields: [map], shipping_taxes: [map], status: str, status_name: str, status_enum: str, tracking_url: str, tracking_company: str, tracking_number: str, shipping_option: str, same_day_delivery: bool, shipment_status: str, shipment_status_enum: str, recovered_from: int(int32), external_shipping_rate_id: str, external_shipping_rate_description: str, billing_information: map{business_activity: str, company_name: str, taxpayer_type: str}}}
@errors {404}

@endpoint GET /orders/{id}/history.json
@required {id: int(int32)}
@returns(200)

@endpoint POST /orders/{id}/history.json
@required {id: int(int32)}
@optional {order_history: map{message: str, log: map}}
@returns(200) {order_history: map{id: int(int32), message: str, created_at: str}}

@endpoint GET /orders/{id}/documents.json
@required {id: int(int32)}
@returns(200)

@endpoint POST /orders/{id}/documents.json
@required {id: int(int32)}
@optional {document: map{document_type: int, external_id: str, public_id: str, url: str, order_id: int, app_code: str}}
@returns(200) {document: map{document_type: int, external_id: str, public_id: str, url: str, order_id: int, app_code: str}}

@endpoint PUT /orders/{id}/documents/{public_id}.json
@required {id: int(int32), public_id: int(int32)}
@optional {document_type: int(0 - credit note/1 - invoice), external_id: str, public_id: str, url: str}
@returns(200) {document: map{document_type: int, external_id: str, public_id: str, url: str, order_id: int, app_code: str}}
@errors {404}

@endpoint DELETE /orders/{id}/documents/{public_id}.json
@required {id: int(int32), public_id: int(int32)}
@returns(200)
@errors {404}

@endgroup

@group fulfillments
@endpoint GET /fulfillments/count.json
@returns(200) {count: int(int32)}

@endpoint POST /fulfillments/rates.json
@optional {rates: map{order_id: str, location_id!: str, shipping_address: map, packages_dimensions: [map]}}
@returns(200)

@endgroup

@group fulfillments.json
@endpoint GET /fulfillments.json
@optional {limit: int(integer)=50, page: int(integer)=1}
@returns(200)

@endpoint POST /fulfillments.json
@optional {fulfillment: map{order_id: str, type!: str, shipping_address: map, receiver_email: str, packages_dimensions: [map], location_id!: str, phone: str, phone_prefix: str, tracking_number: str, tracking_company: str, tracking_url: str, external_id: str, service_type: str, message: str, observations: str, expected_arrival_from: str, expected_arrival_to: str, send_email: bool}}
@returns(200) {fulfillment: map{id: int(int32), created_at: str, updated_at: str, tracking_number: str, tracking_company: str, type: str, shipment_status: str, label_url: str, expected_arrival_from: str, expected_arrival_to: str, fulfillment_address: map{address: map{name: str, surname: str, address: str, city: str, postal: str, municipality: str, region: str, country: str}}, order_id: int(int32), order: map{order: map{order: map}}}}

@endgroup

@group fulfillments
@endpoint GET /fulfillments/{id}/label.json
@required {id: int(int32)}
@returns(200) {url: str, expires_at: str(date-time)}
@errors {400, 404}

@endpoint GET /fulfillments/{id}.json
@required {id: int(int32)}
@returns(200) {fulfillment: map{id: int(int32), created_at: str, updated_at: str, tracking_number: str, tracking_company: str, type: str, shipment_status: str, label_url: str, expected_arrival_from: str, expected_arrival_to: str, fulfillment_address: map{address: map{name: str, surname: str, address: str, city: str, postal: str, municipality: str, region: str, country: str}}, order_id: int(int32), order: map{order: map{order: map}}}}
@errors {404}

@endpoint PUT /fulfillments/{id}.json
@required {id: int(int32)}
@optional {fulfillment: map{shipment_status: str, type: str, tracking_number: str, tracking_company: str, tracking_url: str, external_id: str, service_type: str, message: str, observations: str, expected_arrival_from: str, expected_arrival_to: str}}
@returns(200) {fulfillment: map{id: int(int32), created_at: str, updated_at: str, tracking_number: str, tracking_company: str, type: str, shipment_status: str, label_url: str, expected_arrival_from: str, expected_arrival_to: str, fulfillment_address: map{address: map{name: str, surname: str, address: str, city: str, postal: str, municipality: str, region: str, country: str}}, order_id: int(int32), order: map{order: map{order: map}}}}
@errors {404}

@endgroup

@group order
@endpoint GET /order/{id}/fulfillments.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endgroup

@group pages.json
@endpoint GET /pages.json
@optional {limit: int(integer)=50, page: int(integer)=1}
@returns(200)

@endpoint POST /pages.json
@optional {page: map{title: str, body: str, status: str, page_title: str, meta_description: str, categories: [int], template: str, permalink: str}}
@returns(200) {page: map{id: int, title: str, body: str, status: str, legal: bool, page_title: str, meta_description: str, categories: [map], template: map{id: int, name: str}, permalink: str, image: map{id: int, url: str}}}

@endgroup

@group pages
@endpoint GET /pages/count.json
@returns(200) {count: int(int32)}

@endpoint GET /pages/{id}.json
@required {id: int(int32)}
@returns(200) {page: map{id: int, title: str, body: str, status: str, legal: bool, page_title: str, meta_description: str, categories: [map], template: map{id: int, name: str}, permalink: str, image: map{id: int, url: str}}}
@errors {404}

@endpoint PUT /pages/{id}.json
@required {id: int(int32)}
@optional {page: map{title: str, body: str, status: str, page_title: str, meta_description: str, categories: [int], template: str, permalink: str}}
@returns(200) {page: map{id: int, title: str, body: str, status: str, legal: bool, page_title: str, meta_description: str, categories: [map], template: map{id: int, name: str}, permalink: str, image: map{id: int, url: str}}}
@errors {404}

@endpoint DELETE /pages/{id}.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint GET /pages/{id}/images.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint POST /pages/{id}/images.json
@required {id: int(int32)}
@optional {image: map{url: str}}
@returns(200) {image: map{id: int(int32), url: str}}

@endpoint GET /pages/{id}/images/count.json
@required {id: int(int32)}
@returns(200) {count: int(int32)}
@errors {404}

@endpoint GET /pages/{id}/images/{image_id}.json
@required {id: int(int32), image_id: int(int32)}
@returns(200) {image: map{id: int(int32), url: str}}
@errors {404}

@endpoint PUT /pages/{id}/images/{image_id}.json
@required {id: int(int32), image_id: int(int32)}
@optional {image: map{url: str}}
@returns(200) {image: map{id: int(int32), url: str}}
@errors {404}

@endpoint DELETE /pages/{id}/images/{image_id}.json
@required {id: int(int32), image_id: int(int32)}
@returns(200)
@errors {404}

@endgroup

@group customers.json
@endpoint GET /customers.json
@optional {limit: int(integer)=50, page: int(integer)=1}
@returns(200)

@endpoint POST /customers.json
@optional {customer: map{email: str, phone: str, password: str, status: str, shipping_address: map, billing_address: map, customer_category: [int]}}
@returns(200) {customer: map{id: int(int32), email: str, phone: str, fullname: str, status: str, accepts_marketing: bool, accepted_marketing_at: str, cancelled_marketing_at: str, shipping_address: map{name: str, surname: str, address: str, city: str, postal: str, municipality: str, region: str, country: str}, billing_address: map{name: str, surname: str, taxid: str, address: str, city: str, postal: str, municipality: str, region: str, country: str}, customer_categories: [map], customer_additional_fields: [map]}}
@errors {404}

@endgroup

@group customers
@endpoint GET /customers/count.json
@returns(200) {count: int(int32)}

@endpoint GET /customers/email/{email}.json
@required {email: str}
@returns(200) {customer: map{id: int(int32), email: str, phone: str, fullname: str, status: str, accepts_marketing: bool, accepted_marketing_at: str, cancelled_marketing_at: str, shipping_address: map{name: str, surname: str, address: str, city: str, postal: str, municipality: str, region: str, country: str}, billing_address: map{name: str, surname: str, taxid: str, address: str, city: str, postal: str, municipality: str, region: str, country: str}, customer_categories: [map], customer_additional_fields: [map]}}
@errors {404}

@endpoint GET /customers/{id}/orders.json
@required {id: int}
@optional {limit: int(integer)=50, page: int(integer)=1}
@returns(200)
@errors {404}

@endpoint GET /customers/{id}/orders/status/{status}.json
@required {id: int, status: str(Abandoned/Canceled/Pending Payment/Paid)}
@optional {limit: int(integer)=50, page: int(integer)=1}
@returns(200)
@errors {404}

@endpoint GET /customers/{id}.json
@required {id: int(int32)}
@returns(200) {customer: map{id: int(int32), email: str, phone: str, fullname: str, status: str, accepts_marketing: bool, accepted_marketing_at: str, cancelled_marketing_at: str, shipping_address: map{name: str, surname: str, address: str, city: str, postal: str, municipality: str, region: str, country: str}, billing_address: map{name: str, surname: str, taxid: str, address: str, city: str, postal: str, municipality: str, region: str, country: str}, customer_categories: [map], customer_additional_fields: [map]}}
@errors {404}

@endpoint PUT /customers/{id}.json
@required {id: int(int32)}
@optional {customer: map{email: str, phone: str, password: str, status: str, shipping_address: map, billing_address: map, customer_category: [int]}}
@returns(200) {customer: map{id: int(int32), email: str, phone: str, fullname: str, status: str, accepts_marketing: bool, accepted_marketing_at: str, cancelled_marketing_at: str, shipping_address: map{name: str, surname: str, address: str, city: str, postal: str, municipality: str, region: str, country: str}, billing_address: map{name: str, surname: str, taxid: str, address: str, city: str, postal: str, municipality: str, region: str, country: str}, customer_categories: [map], customer_additional_fields: [map]}}
@errors {404}

@endpoint DELETE /customers/{id}.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint GET /customers/search.json
@required {query: str(string)}
@optional {order: str(string)=asc, limit: int(integer)=50, page: int(integer)=1}
@returns(200)

@endgroup

@group customer_categories.json
@endpoint GET /customer_categories.json
@optional {limit: int(integer)=50, page: int(integer)=1}
@returns(200)

@endpoint POST /customer_categories.json
@optional {customer_category: map{name: str}}
@returns(200) {customer_category: map{id: int(int32), name: str, code: str}}
@errors {404}

@endgroup

@group customer_categories
@endpoint GET /customer_categories/{id}.json
@required {id: int(int32)}
@returns(200) {customer_category: map{id: int(int32), name: str, code: str}}
@errors {404}

@endpoint PUT /customer_categories/{id}.json
@required {id: int(int32)}
@optional {customer_category: map{name: str}}
@returns(200) {customer_category: map{id: int(int32), name: str, code: str}}
@errors {404}

@endpoint DELETE /customer_categories/{id}.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint GET /customer_categories/{id}/customers.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint POST /customer_categories/{id}/customers.json
@required {id: int(int32)}
@optional {customers: [map{id: int(int32), email: str}]}
@returns(200)
@errors {404}

@endpoint DELETE /customer_categories/{id}/customers/{customer_id}.json
@required {id: int(int32), customer_id: int(int32)}
@returns(200)
@errors {404}

@endgroup

@group customers
@endpoint GET /customers/{id}/fields
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint POST /customers/{id}/fields
@required {id: int(int32)}
@optional {customer_additional_field: map{value: str, checkout_custom_field_id: int(int32)}}
@returns(200) {customer_additional_field: map{id: int(int32), label: str, value: str, area: str, customer_id: int(int32), checkout_custom_field_id: int(int32)}}
@errors {404}

@endpoint GET /customers/{id}/fields/{field_id}
@required {id: int(int32), field_id: int(int32)}
@returns(200) {customer_additional_field: map{id: int(int32), label: str, value: str, area: str, customer_id: int(int32), checkout_custom_field_id: int(int32)}}
@errors {404}

@endpoint PUT /customers/{id}/fields/{field_id}
@required {id: int(int32), field_id: int(int32)}
@optional {customer_additional_field: map{value: str, checkout_custom_field_id: int(int32)}}
@returns(200) {customer_additional_field: map{id: int(int32), label: str, value: str, area: str, customer_id: int(int32), checkout_custom_field_id: int(int32)}}
@errors {400, 404}

@endpoint DELETE /customers/{id}/fields/{field_id}
@required {id: int(int32), field_id: int(int32)}
@returns(200)
@errors {404}

@endgroup

@group promotions.json
@endpoint GET /promotions.json
@optional {limit: int(integer), page: int(integer)}
@returns(200)

@endpoint POST /promotions.json
@optional {promotion: map{name: str, enabled: bool, discount_target: str, buys_at_least: str, condition_price: num(float), condition_qty: int(int32), quantity_x: int(int32), type: str, discount_amount_fix: num(float), discount_amount_percent: num(float), lasts: str, begins_at: str, expires_at: str, max_times_used: int(int32), cumulative: bool, customers: str, categories: [map], categories_x: [map], customer_categories: [map], products: [map], products_x: [map], coupons: [map], countries: [str], regions: [str], municipalities: [str]}}
@returns(200) {promotion: map{id: int(int32), name: str, status: str, enabled: bool, discount_target: str, condition_price: num(float), condition_qty: int(int32), quantity_x: int(int32), discount_amount_fix: num(float), discount_amount_percent: num(float), lasts: str, begins_at: str, expires_at: str, times_used: int(int32), max_times_used: int(int32), cumulative: bool, categories: [map], customer_categories: [map], products: [map], products_x: [map], coupons: [map], countries: [str], regions: [str], municipalities: [str]}}
@errors {404}

@endgroup

@group promotions
@endpoint GET /promotions/{id}.json
@required {id: int(int32)}
@returns(200) {promotion: map{id: int(int32), name: str, status: str, enabled: bool, discount_target: str, condition_price: num(float), condition_qty: int(int32), quantity_x: int(int32), discount_amount_fix: num(float), discount_amount_percent: num(float), lasts: str, begins_at: str, expires_at: str, times_used: int(int32), max_times_used: int(int32), cumulative: bool, categories: [map], customer_categories: [map], products: [map], products_x: [map], coupons: [map], countries: [str], regions: [str], municipalities: [str]}}
@errors {404}

@endpoint PUT /promotions/{id}.json
@required {id: int(int32)}
@optional {promotion: map{name: str, enabled: bool, discount_target: str, buys_at_least: str, condition_price: num(float), condition_qty: int(int32), quantity_x: int(int32), type: str, discount_amount_fix: num(float), discount_amount_percent: num(float), lasts: str, begins_at: str, expires_at: str, max_times_used: int(int32), cumulative: bool, customers: str, categories: [map], categories_x: [map], customer_categories: [map], products: [map], products_x: [map], coupons: [map], countries: [str], regions: [str], municipalities: [str]}}
@returns(200) {promotion: map{id: int(int32), name: str, status: str, enabled: bool, discount_target: str, condition_price: num(float), condition_qty: int(int32), quantity_x: int(int32), discount_amount_fix: num(float), discount_amount_percent: num(float), lasts: str, begins_at: str, expires_at: str, times_used: int(int32), max_times_used: int(int32), cumulative: bool, categories: [map], customer_categories: [map], products: [map], products_x: [map], coupons: [map], countries: [str], regions: [str], municipalities: [str]}}
@errors {404}

@endpoint DELETE /promotions/{id}.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endgroup

@group payment_methods.json
@endpoint GET /payment_methods.json
@returns(200)

@endpoint POST /payment_methods.json
@optional {payment_method: map{name: str, description: str, payment_method_url: str, key: str, secret: str, show_review: bool, use_new_version: bool}}
@returns(200) {payment_method: map{id: int(int32), type: str, name: str}}
@errors {404}

@endgroup

@group payment_methods
@endpoint GET /payment_methods/{id}.json
@required {id: int(int32)}
@returns(200) {payment_method: map{id: int(int32), type: str, name: str}}
@errors {404}

@endgroup

@group shipping_methods.json
@endpoint GET /shipping_methods.json
@optional {enabled: bool}
@returns(200)

@endpoint POST /shipping_methods.json
@optional {shipping_method: map{type: str, name: str}}
@returns(200) {shipping_method: map{id: int(int32), type: str, name: str, enabled: bool, free_shipping: bool, free_shipping_minimum_purchase: bool, fee: [map], callback_url: str, fetch_services_url: str, state: str, city: str, postal: str, services: [map], tables: [map]}}
@errors {404}

@endgroup

@group shipping_methods
@endpoint GET /shipping_methods/{id}.json
@required {id: int(int32)}
@returns(200) {shipping_method: map{id: int(int32), type: str, name: str, enabled: bool, free_shipping: bool, free_shipping_minimum_purchase: bool, fee: [map], callback_url: str, fetch_services_url: str, state: str, city: str, postal: str, services: [map], tables: [map]}}
@errors {404}

@endpoint PUT /shipping_methods/{id}.json
@required {id: int(int32)}
@optional {shipping_method: map{type: str, name: str}}
@returns(200) {shipping_method: map{id: int(int32), type: str, name: str, enabled: bool, free_shipping: bool, free_shipping_minimum_purchase: bool, fee: [map], callback_url: str, fetch_services_url: str, state: str, city: str, postal: str, services: [map], tables: [map]}}
@errors {404}

@endpoint DELETE /shipping_methods/{id}.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endgroup

@group locations.json
@endpoint GET /locations.json
@returns(200)

@endpoint POST /locations.json
@required {name: str, email: str, address: str, city: str, country: str}
@optional {main: bool, pickup_point: bool, postal: str, Region: str}
@returns(200) {location: map{id: int(int32), name: str, email: str, active: bool, main: bool, pickup_point: bool, is_stock_origin: bool, location_address: map{id: int(int32), name: str, surname: str, address: str, street_number: str, complement: str, city: str, postal: str, country: str, region: str, type: str, taxid: str, taxid_type: str, default: bool, region_format: str, municipality: str, latitude: num(float), longitude: num(float)}}}

@endgroup

@group locations
@endpoint GET /locations/{id}.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint PUT /locations/{id}.json
@required {id: int(int32), name: str, email: str, address: str, city: str, country: str}
@optional {main: bool, pickup_point: bool, postal: str, Region: str}
@returns(200) {location: map{id: int(int32), name: str, email: str, active: bool, main: bool, pickup_point: bool, is_stock_origin: bool, location_address: map{id: int(int32), name: str, surname: str, address: str, street_number: str, complement: str, city: str, postal: str, country: str, region: str, type: str, taxid: str, taxid_type: str, default: bool, region_format: str, municipality: str, latitude: num(float), longitude: num(float)}}}

@endpoint DELETE /locations/{id}.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endgroup

@group custom_fields.json
@endpoint GET /custom_fields.json
@returns(200)

@endpoint POST /custom_fields.json
@optional {custom_field: map{label: str, type: str, values: [str], product_visibility: bool}}
@returns(200) {custom_field: map{id: int(int32), label: str, type: str, values: [str], product_visibility: bool}}

@endgroup

@group custom_fields
@endpoint GET /custom_fields/{id}.json
@required {id: int(int32)}
@returns(200) {custom_field: map{id: int(int32), label: str, type: str, values: [str], product_visibility: bool}}
@errors {404}

@endpoint PUT /custom_fields/{id}.json
@required {id: int(int32)}
@optional {custom_field: map{label: str, type: str, values: [str], product_visibility: bool}}
@returns(200) {custom_field: map{id: int(int32), label: str, type: str, values: [str], product_visibility: bool}}
@errors {404}

@endpoint DELETE /custom_fields/{id}.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endpoint GET /custom_fields/{id}/select_options.json
@required {id: int(int32)}
@returns(200)

@endpoint POST /custom_fields/{id}/select_options.json
@required {id: int(int32)}
@optional {custom_field_select_option: map{value: str}}
@returns(200) {custom_field_select_option: map{id: int(int32), value: str}}

@endpoint GET /custom_fields/{id}/select_options/{custom_field_select_option_id}.json
@required {id: int(int32), custom_field_select_option_id: int(int32)}
@returns(200) {custom_field_select_option: map{id: int(int32), value: str}}
@errors {404}

@endpoint PUT /custom_fields/{id}/select_options/{custom_field_select_option_id}.json
@required {id: int(int32), custom_field_select_option_id: int(int32)}
@optional {custom_field_select_option: map{value: str}}
@returns(200) {custom_field_select_option: map{id: int(int32), value: str}}
@errors {404}

@endpoint DELETE /custom_fields/{id}/select_options/{custom_field_select_option_id}.json
@required {id: int(int32), custom_field_select_option_id: int(int32)}
@returns(200)
@errors {404}

@endgroup

@group checkout_custom_fields.json
@endpoint GET /checkout_custom_fields.json
@optional {limit: int(integer)=50, page: int(integer)=1}
@returns(200)

@endpoint POST /checkout_custom_fields.json
@optional {checkout_custom_field: map{label: str, type: str, area: str, required: bool, position: int(int32), deletable: bool, custom_field_select_options: [str]}}
@returns(200) {checkout_custom_field: map{id: int(int32), label: str, type: str, area: str, required: bool, position: int(int32), deletable: bool, custom_field_select_options: [str]}}
@errors {404}

@endgroup

@group checkout_custom_fields
@endpoint GET /checkout_custom_fields/{id}.json
@required {id: int(int32)}
@returns(200) {checkout_custom_field: map{id: int(int32), label: str, type: str, area: str, required: bool, position: int(int32), deletable: bool, custom_field_select_options: [str]}}
@errors {404}

@endpoint PUT /checkout_custom_fields/{id}.json
@required {id: int(int32)}
@optional {checkout_custom_field: map{label: str, type: str, area: str, required: bool, position: int(int32), deletable: bool, custom_field_select_options: [str]}}
@returns(200) {checkout_custom_field: map{id: int(int32), label: str, type: str, area: str, required: bool, position: int(int32), deletable: bool, custom_field_select_options: [str]}}
@errors {404}

@endpoint DELETE /checkout_custom_fields/{id}.json
@required {id: int(int32)}
@returns(200)
@errors {404}

@endgroup

@group countries.json
@endpoint GET /countries.json
@returns(200)

@endgroup

@group countries
@endpoint GET /countries/{country_code}.json
@required {country_code: str(string)}
@returns(200) {code: str, name: str}
@errors {404}

@endpoint GET /countries/{country_code}/regions.json
@required {country_code: str(string)}
@returns(200)
@errors {404}

@endpoint GET /countries/{country_code}/regions/{region_code}/municipalities.json
@required {country_code: str(string), region_code: str(string)}
@returns(200)
@errors {404}

@endpoint GET /countries/{country_code}/regions/{region_code}.json
@required {country_code: str(string), region_code: str(string)}
@returns(200) {code: str, name: str, iso: str}
@errors {404}

@endgroup

@group taxes.json
@endpoint GET /taxes.json
@returns(200)

@endpoint POST /taxes.json
@optional {tax: map{country: str, name: str, region: str, category_id: int(int32), tax: num(float), fixed: bool, shipping: bool}}
@returns(200) {tax: map{id: int(int32), name: str, country: str, region: str, category_id: int(int32), tax_amount: num(float), fixed: bool, shipping: bool}}
@errors {404}

@endgroup

@group taxes
@endpoint GET /taxes/{id}.json
@required {id: int(int32)}
@returns(200) {tax: map{id: int(int32), name: str, country: str, region: str, category_id: int(int32), tax_amount: num(float), fixed: bool, shipping: bool}}
@errors {404}

@endgroup

@group store
@endpoint POST /store/setup.json
@required {store: map{name!: str, country: str, theme: str}}
@returns(201) {store: map{code: str, name: str, url: str, admin_url: str}, credentials: map{login: str, authtoken: str}}
@errors {400, 402, 403, 429}

@endgroup

@group carts
@endpoint GET /carts/{id}.json
@required {id: int(int32)}
@optional {locale: str(string)}
@returns(200)
@errors {404}

@endgroup

@group documents.json
@endpoint GET /documents.json
@optional {limit: int(integer)=50, page: int(integer)=1}
@returns(200)

@endgroup

@group transaction_ledger
@endpoint GET /transaction_ledger/balance.json
@returns(200)

@endgroup

@group products_locations
@endpoint GET /products_locations
@required {location_ids: [int], product_ids: [int]}
@optional {variant_ids: [int]}
@returns(200)
@errors {404}

@endpoint PUT /products_locations
@required {location_id: int, product_id: int, stock_unlimited: bool, stock: int}
@optional {variant_id: int}
@returns(200)
@errors {400, 500}

@endgroup

@end
