openapi: 3.0.0
info:
  title: ChannelApe V1 API Documentation
  description: >-
    # Error Handling

    Invalid requests will return with a non-200 level status code. The request
    will also contain one to many error codes. You can look up the error code
    and its meaning in the below table. 


    500 level status codes are usually intermittent and should be retried. If
    you are still encountering a 500 level status code after retrying the
    request a few times, please [open a bug on our community
    page](https://community.channelape.com/c/give-feedback) and a ChannelApe
    team member will look into it.


    |Code | Enum | Message |

    |--|--|--|

    | 0 | INTERNAL_SERVER_ERROR | An internal server error occurred. Please
    check the server logs. |

    | 1 | USER_ALREADY_EXISTS | User already exists for email address. |

    | 2 | INCORRECT_USERNAME_OR_PASSWORD | Invalid email or password. |

    | 3 | INVALID_VERIFICATION_TOKEN | Invalid verification code. Please check
    the link in your email. |

    | 4 | MALFORMED_AUTHORIZATION_TOKEN | A malformed authorization token was
    received. Please check the server logs and try again. |

    | 5 | MALFORMED_USERNAME | Email address is not valid. |

    | 6 | MALFORMED_PASSWORD | Password does not meet our requirements. |

    | 7 | EXPIRED_VERIFICATION_TOKEN | Verification code has expired. Please
    request a new one. |

    | 8 | USERNAME_NOT_FOUND | Could not find user for given username. |

    | 9 | INVALID_FORGOT_PASSWORD_TOKEN | Invalid forgot password code. Please
    check the link in your email. |

    | 10 | EXPIRED_FORGOT_PASSWORD_TOKEN | Password reset code has expired.
    Please request a new one. |

    | 11 | EXPIRED_AUTHORIZATION_TOKEN | Authorization token has expired. Please
    request a new one. |

    | 12 | INVALID_AUTHORIZATION_TOKEN | Invalid authorization token. Please
    check the server logs and try again. |

    | 13 | INVALID_BUSINESS_NAME | Business name cannot be blank. |

    | 14 | INVALID_TIME_ZONE | Provided time zone is invalid. |

    | 15 | BUSINESS_NOT_FOUND | Requested business cannot be found. |

    | 16 | INSUFFICIENT_BUSINESS_OWNER_PERMISSIONS | Only the business owner is
    allowed to perform this action. |

    | 17 | INSUFFICIENT_BUSINESS_MEMBER_PERMISSIONS | Only a member of this
    business can perform this action. |

    | 18 | USER_NOT_FOUND | Requested user cannot be found. |

    | 19 | INSUFFICIENT_USER_PERMISSIONS | You are not authorized to update this
    user. |

    | 20 | USER_ALREADY_BUSINESS_MEMBER | User cannot be added to business
    because they are already a member. |

    | 21 | BUSINESS_MEMBER_NOT_FOUND | Requested business member cannot be
    found. |

    | 22 | INVALID_QUERY_PARAMETERS | Request cannot be completed with given
    query parameters. |

    | 23 | OWNER_DELETION_NOT_ALLOWED | Business owner cannot be removed from
    members list. |

    | 24 | PRODUCT_NOT_FOUND | Product not found. |

    | 25 | SUPPLIER_NOT_FOUND | Supplier could not be found for business. |

    | 26 | SKU_NOT_FOUND | SKU is required for this request and could not be
    found. |

    | 27 | UPC_NOT_FOUND | UPC is required for this request and could not be
    found. |

    | 28 | TITLE_NOT_SET | Title is required field for this request. |

    | 29 | INVALID_CURRENCY_CODE | Alphabetic currency code provided must be one
    from ISO4217. |

    | 30 | INVALID_INVENTORY_ITEM_KEY | Inventory item key of SKU or UPC is
    required for business creation. |

    | 31 | INVENTORY_ITEM_ALREADY_EXISTS | Inventory item already exists for
    this supplier with given index key. |

    | 32 | INVALID_RETAIL_PRICE | Retail price must be a number greater than or
    equal to zero. |

    | 33 | INVALID_WHOLESALE_PRICE | Wholesale price must be a number greater
    than or equal to zero. |

    | 34 | INVALID_GRAMS | Grams must be a number greater than or equal to zero.
    |

    | 35 | INVALID_QUANTITY | Quantity must be a number greater than or equal to
    zero. |

    | 36 | INVENTORY_ITEM_NOT_FOUND | Inventory item could not be found for
    business. |

    | 37 | SKU_DOES_NOT_MATCH_INVENTORY_ITEM_VALUE | SKU cannot be changed on an
    inventory item when SKU is selected as the inventory item key for the
    business. |

    | 38 | UPC_DOES_NOT_MATCH_INVENTORY_ITEM_VALUE | UPC cannot be changed on an
    inventory item when UPC is selected as the inventory item key for the
    business. |

    | 39 | NOT_SUPPLIER_OF_BUSINESS | One of the provided supplier IDs does not
    exist or is not a supplier of your business. |

    | 40 | INTEGRATION_NOT_FOUND | Requested integration cannot be found. |

    | 41 | INVALID_SUPPLIER_INTEGRATION_CREDENTIALS | Required supplier
    integration values were not found. |

    | 42 | INVALID_INTEGRATION_ACTION | This action is not supported by the
    given integration. |

    | 43 | MISSING_REQUIRED_VARIANT_ATTRIBUTES | Missing a required variant
    attribute.  Please confirm your request has IDs for the title, condition,
    and retailPrice attributes. |

    | 44 | VARIANT_EXISTS_CREATION_FAILURE | Cannot create variant because this
    variant already exists in our system.  If you're trying to update this
    variant, please refer to the update API. |

    | 45 | VARIANT_NOT_FOUND | Variant not found.  Please check the provided SKU
    or UPC and Product ID. |

    | 46 | CONDITION_REQUIRED | Attribute: condition is required.  Please
    specify NEW, USED, or REFURBISHED as the item condition. |

    | 47 | TITLE_REQUIRED | Attribute: title is required.  Please specify title
    for this request. |

    | 48 | VENDOR_REQUIRED | Attribute: vendor is required.  Please specify
    vendor for this request. |

    | 49 | RETAIL_PRICE_REQUIRED | Attribute: retailPrice is required.  Please
    specify retailPrice for this request. |

    | 50 | INTEGRATION_ALREADY_EXISTS_FOR_BUSINESS | This integration already
    exists for your business. |

    | 51 | INVALID_CONDITION | Received invalid condition. Please specify NEW,
    USED, or REFURBISHED. |

    | 52 | INVALID_QUANTITY_MIN | Minimum quantity must be a number greater than
    or equal to zero. |

    | 53 | INVALID_QUANTITY_MAX | Maximum quantity must be a number greater than
    or equal to zero. |

    | 54 | INVALID_RETAIL_PRICE_MIN | Minimum retail price must be a number
    greater than or equal to zero. |

    | 55 | INVALID_RETAIL_PRICE_MAX | Maximum retail price must be a number
    greater than or equal to zero. |

    | 56 | INVALID_WHOLESALE_PRICE_MIN | Minimum wholesale price must be a
    number greater than or equal to zero. |

    | 57 | INVALID_WHOLESALE_PRICE_MAX | Maximum wholesale price must be a
    number greater than or equal to zero. |

    | 58 | INVALID_WEIGHT_MIN | Minimum weight must be a number greater than or
    equal to zero. |

    | 59 | INVALID_WEIGHT_MAX | Maximum weight must be a number greater than or
    equal to zero. |

    | 60 | INVALID_QUANTITY_RANGE | Maximum quantity cannot be less than minimum
    quantity. |

    | 61 | INVALID_WEIGHT_RANGE | Maximum weight cannot be less than minimum
    weight. |

    | 62 | INVALID_RETAIL_PRICE_RANGE | Maximum retail price cannot be less than
    minimum retail price. |

    | 63 | INVALID_WHOLESALE_PRICE_RANGE | Maximum wholesale price cannot be
    less than minimum wholesale price. |

    | 64 | PRODUCT_FILTER_NOT_FOUND | Product filter could not be found. |

    | 65 | INVALID_PRODUCT_MODIFIER_NAME | Product modifier name cannot be
    blank. |

    | 66 | INVALID_PRODUCT_MODIFIER | Provided product modifier is invalid. |

    | 67 | INVALID_PRODUCT_MODIFIER_TARGET | Provided product modifier target is
    invalid. |

    | 68 | INVALID_PRODUCT_MODIFIER_VALUE | Provided product modifier value is
    invalid. |

    | 69 | INVALID_CHANNEL_INTEGRATION_CREDENTIALS | Required channel
    integration values were not found. |

    | 70 | CHANNEL_NOT_FOUND | Channel could not be found for business. |

    | 71 | INVALID_INTEGRATION_TYPE | This resource cannot be used with the
    provided integration due to conflicting integration types. |

    | 72 | PRODUCT_MODIFIER_NOT_FOUND | Product modifier could not be found. |

    | 73 | PRODUCT_BLOCK_NOT_FOUND | Product block could not be found. |

    | 74 | BUSINESS_ID_NOT_FOUND | Business ID is a required query parameter for
    this request. |

    | 75 | INVALID_VARIANT_REFERENCE_QUERY_MISSING_PARAM | You must supply an
    inventoryItemValue or sku for this query. |

    | 76 | PRODUCT_FILTER_USED_IN_PRODUCT_BLOCK | Product filter cannot be
    deleted because it is currently being used by one or many product blocks. |

    | 77 | PRODUCT_PUSH_NOT_FOUND | Product push could not be found. |

    | 78 | PRODUCT_FILTER_REQUIRED | Attribute: productFilterIds is required. 
    Please specify at least one product filter ID for this request. |

    | 79 | DUPLICATE_PRODUCT_MODIFIER_TARGET | Product push cannot have two
    product modifiers with the same target. |

    | 80 | INVALID_PRODUCT_PUSH_ORDINAL | Product push ordinal must be greater
    than zero. |

    | 81 | PRODUCT_FILTER_USED_IN_PRODUCT_PUSH | Product filter cannot be
    deleted because it is currently being used by one or many product pushes. |

    | 82 | PRODUCT_MODIFIER_USED_IN_PRODUCT_PUSH | Product modifier cannot be
    deleted because it is currently being used by one or many product pushes. |

    | 83 | PATH_DOES_NOT_EXIST | Requested path does not exist. |

    | 84 | SERVICE_UNAVAILABLE | Service is temporarily unavailable. |

    | 85 | INVALID_CHANNEL_SETTINGS_PRICE_TYPE | Price type for channel settings
    is invalid. |

    | 86 | INVALID_CHANNEL_SETTINGS_UPDATE_FIELD | Update field for channel
    settings is invalid. |

    | 87 | INVALID_CHANNEL_NAME | Channel name cannot be blank. |

    | 88 | CHANNEL_NAME_ALREADY_EXISTS_FOR_BUSINESS | This name already exists
    for a channel in your business. |

    | 89 | SHOPIFY_AUTHORIZATION_CODE_REQUIRED | Attribute: authorizationCode is
    required. Please specify authorization code for this request. |

    | 90 | SHOPIFY_SUBDOMAIN_REQUIRED | Attribute: shopifySubdomain is required.
    Please specify shop subdomain for this request. |

    | 91 | SHOPIFY_SUBDOMAIN_NOT_FOUND | Shopify subdomain could not be found. |

    | 92 | INVALID_SHOPIFY_AUTHORIZATION_CODE | Shopify authorization code is
    invalid. |

    | 93 | SUBSCRIPTION_EXISTS_CREATION_FAILURE | Cannot create subscription
    because this subscription already exists in our system.  If you're trying to
    update this subscription, please refer to the update API. |

    | 94 | SUBSCRIPTION_NOT_FOUND | Subscription not found for business. |

    | 95 | DAYS_OF_WEEK_REQUIRED | At least one day of the week is required for
    this request and could not be found. |

    | 96 | INVALID_DAYS_OF_WEEK | Days of week provided are invalid. |

    | 97 | INVALID_DAILY_START_TIME_IN_MINUTES | Daily start time in minutes
    must be a number between 1 and 1440. |

    | 98 | INVALID_DAILY_END_TIME_IN_MINUTES | Daily end time in minutes must be
    a number between 1 and 1440 that is greater than the daily start time in
    minutes. |

    | 99 | INVALID_DAILY_INTERVAL_IN_MINUTES | Daily interval in minutes must be
    a number between 1 and 1440. |

    | 100 | SCHEDULE_NOT_FOUND | Schedule could not be found. |

    | 101 | RECIPE_NOT_FOUND | Recipe could not be found. |

    | 102 | RECIPE_SOURCE_NOT_FOUND | Recipe source could not be found for
    business. |

    | 103 | INVALID_RECIPE_SOURCE_TYPE | Recipe source type is invalid. |

    | 104 | INVALID_RECIPE_SOURCE_ACTION | Recipe source action could not be
    found for integration. |

    | 105 | RECIPE_TARGET_NOT_FOUND | Recipe target could not be found for
    business. |

    | 106 | INVALID_RECIPE_TARGET_TYPE | Recipe target type is invalid. |

    | 107 | INVALID_RECIPE_TARGET_ACTION | Recipe target action could not be
    found for integration. |

    | 108 | DUPLICATE_RECIPE_SOURCE_AND_TARGET | Recipes source ID, type, and
    action cannot match recipe target ID, type, and action. |

    | 109 | INVALID_MINUTE_OF_DAY | Minute of day must be a number between 1 and
    1440. |

    | 110 | INVALID_DAY_OF_WEEK | Day of week provided is invalid. |

    | 111 | ACTION_NOT_FOUND | Action could not be found. |

    | 112 | INVALID_ACTION_TARGET_TYPE | Action target type is invalid. |

    | 113 | ACTION_ALREADY_COMPLETED | Action has already been completed. |

    | 114 | INVALID_ACTION_HEALTH_CHECK_INTERVAL | Action health check interval
    must be a number between 5 seconds and 12 hours. |

    | 115 | INVALID_ACTION_TARGET | Action target could not be found for
    business. |

    | 116 | INVALID_SUPPLIER_NAME | Supplier name cannot be blank. |

    | 117 | SUPPLIER_NAME_ALREADY_EXISTS_FOR_BUSINESS | This name already exists
    for a supplier in your business. |

    | 118 | RECIPE_SOURCE_DISABLED | Recipes require enabled applications.  The
    provided source application is currently disabled. |

    | 119 | RECIPE_TARGET_DISABLED | Recipes require enabled applications.  The
    provided target application is currently disabled. |

    | 120 | ACTION_ALREADY_IN_PROGRESS | Action cannot be processed right now
    because another matching action is currently in progress. Please try again
    later. |

    | 121 | ACTION_ON_DISABLED_CHANNEL | Action cannot be performed on a
    disabled channel. |

    | 122 | COMPLETED_TASK_NOT_FOUND | Completed task could not be found. |

    | 123 | INVALID_COMPLETED_TASK_TARGET | Completed task target could not be
    found for business. |

    | 124 | INVALID_COMPLETED_TASK_TARGET_TYPE | Completed task target type is
    invalid. |

    | 125 | INVALID_COMPLETED_TASK_OPERATION | Completed task operation is
    invalid. |

    | 126 | ACTION_ON_DISABLED_SUPPLIER | Action cannot be performed on a
    disabled supplier. |

    | 127 | INVALID_SUBSCRIPTION_ID | Subscription ID is invalid. |

    | 128 | INVALID_SUBSCRIPTION_PRODUCT_HANDLE | Subscription product handle is
    invalid. |

    | 129 | INVALID_SUBSCRIPTION_START_PERIOD | Subscription start period date
    is invalid. Must be a valid ISO 8601 formatted date. |

    | 130 | INVALID_SUBSCRIPTION_END_PERIOD | Subscription end period date is
    invalid. Must be a valid ISO 8601 formatted date after the start period
    date. |

    | 131 | INVALID_START_DATE | Start date parameter is invalid. Must be a
    valid ISO 8601 formatted date. |

    | 132 | INVALID_END_DATE | End date parameter is invalid. Must be a valid
    ISO 8601 formatted date after the start date. |

    | 133 | ACTION_ON_INACTIVE_SUBSCRIPTION | Action cannot be performed for
    business with inactive subscription. |

    | 134 | MISSING_SUPPLIER_FILE_SETTINGS_SOURCE | At least one source is
    required for supplier file settings. |

    | 135 | INVALID_SUPPLIER_FILE_SETTINGS_SOURCE_ID | Source ID for supplier
    file settings must be non-empty and unique. |

    | 136 | SUPPLIER_FILE_SETTINGS_MAPPING_SOURCE_ID_NOT_FOUND | Source ID for
    supplier file settings mapping cannot be found in sources. |

    | 137 | INVALID_URL | Valid URL is required. |

    | 138 | INVALID_SUPPLIER_FILE_SETTINGS_SOURCE_JOIN_INDEX | Join index
    greater than or equal to zero is required for all supplier file settings
    sources. |

    | 139 | INVALID_FILE_TYPE | Invalid file type. Acceptable values are CSV,
    TSV, and PSV. |

    | 140 | INVALID_SUPPLIER_FILE_SETTINGS_SOURCE_AUTHORIZATION_USERNAME_KEY |
    Username key for supplier file settings source cannot be found for
    integration. |

    | 141 | INVALID_SUPPLIER_FILE_SETTINGS_SOURCE_AUTHORIZATION_PASSWORD_KEY |
    Password key for supplier file settings source cannot be found for
    integration. |

    | 142 | INVALID_SUPPLIER_FILE_SETTINGS_COLUMN_INDEX | Column index greater
    than or equal to zero is required for all supplier file setting mappings. |

    | 143 | INVALID_SUPPLIER_FILE_SETTINGS_OPTIONS_KEY | Non-empty key is
    required for supplier file settings options mapping. |

    | 144 | INVALID_SUPPLIER_FILE_SETTINGS_ADDITIONAL_FIELDS_KEY | Non-empty key
    is required for supplier file settings additional fields mapping. |

    | 145 | MISSING_SUPPLIER_FILE_SETTINGS_REMOVED_FROM_FEED_TAG | Removed from
    feed tag is required for supplier file settings. |

    | 146 | INVALID_UNIT_OF_MEASUREMENT | Unit of measurement must be oz, lb, g,
    kg, or t. |

    | 147 | INVALID_FILE_ESCAPE_CHARACTER | Escape character for must be a valid
    non-newline ASCII character. |

    | 148 | INVALID_TARGET_TYPE | Invalid target type |

    | 149 | FILE_NOT_FOUND | File could not be found on server. |

    | 150 | FILE_DOWNLOAD_TIMED_OUT | File could not be downloaded within time
    limit. |

    | 151 | FILE_CANNOT_BE_DOWNLOADED | You do not have permission to download
    the file or some other server error occurred. |

    | 152 | WALMART_PRIVATE_KEY_REQUIRED | Attribute: privateKey is required.
    Please specify Private Key for this request. |

    | 153 | WALMART_CONSUMER_ID_REQUIRED | Attribute: consumerId is required.
    Please specify Consumer ID for this request. |

    | 154 | INVALID_WALMART_PRIVATE_KEY | null |

    | 155 | INVALID_WALMART_CREDENTIALS | Invalid Walmart consumerId or
    privateKey. |

    | 156 | INVALID_SUBSCRIPTION_LAST_COMPLETED_TASK_USAGE_RECORDING_TIME |
    Subscription last completed task usage recording time is invalid. Must be a
    valid ISO 8601 formatted date. |

    | 157 | INVALID_CATEGORY_MODIFIER_NAME | Category Modifier name cannot be
    blank. |

    | 158 | INVALID_CATEGORY_MODIFIER_VALUE | Category Modifier value cannot be
    blank. |

    | 159 | INVALID_ORDER_STATUS | Received invalid order status. Please specify
    OPEN, CLOSED, IN_PROGRESS, or CANCELED. |

    | 160 | INVALID_ORDER_TOTAL_PRICE | Order total price must be a number
    greater than or equal to zero. |

    | 161 | INVALID_ORDER_SUBTOTAL_PRICE | Order subtotal price must be a number
    greater than or equal to zero. |

    | 162 | INVALID_ORDER_TOTAL_TAX | Order total tax must be a number greater
    than or equal to zero. |

    | 163 | INVALID_ORDER_TOTAL_GRAMS | Order total grams must be a number
    greater than or equal to zero. |

    | 164 | INVALID_ORDER_PURCHASED_AT_DATE | Attribute: purchasedAt is
    required. Order creation requires valid ISO 8601 fomatted date for
    purchasedAt. |

    | 165 | INVALID_ORDER_CANCELED_AT_DATE | Order canceled at date is invalid.
    Must be a valid ISO 8601 formatted date. |

    | 166 | INVALID_FULFILLMENT_STATUS | Received invalid fulfillment status.
    Please specify PENDING, OPEN, SUCCESS, or CANCELED. |

    | 167 | INVALID_CHANNEL_ORDER_ID | Channel order ID cannot be blank. |

    | 168 | DUPLICATE_CHANNEL_ORDER_ID | Duplicate channel order ID found. All
    channel order IDs must be unique for business. |

    | 169 | INVALID_LINE_ITEM_ID | Line Item ID cannot be blank. |

    | 170 | DUPLICATE_LINE_ITEM_ID | Duplicate line item ID found for order. All
    line items must have unique ID. |

    | 171 | INVALID_LINE_ITEM_QUANTITY | Line item quantity must be greater than
    zero. |

    | 172 | INVALID_LINE_ITEM_PRICE | Line item price must be a number greater
    than or equal to zero. |

    | 173 | LINE_ITEM_REQUIRED | Attribute: lineItems cannot be empty. Line item
    list needs to contain at least one line item. |

    | 174 | ORDER_NOT_FOUND | Order could not be found. |

    | 175 | INVALID_ORDERS_QUERY | Attribute: businessId and channelId cannot be
    empty. Business ID or Channel ID is a required query parameter for this
    request. |

    | 176 | EBAY_RU_NAME_REQUIRED | Attribute: ruName cannot be empty. Please
    specify eBay RuName for this request. |

    | 177 | EBAY_AUTHORIZATION_CODE_REQUIRED | Attribute: authorizationCode
    cannot be empty. Please specify eBay authorization code for this request. |

    | 178 | EBAY_MARKETPLACE_ID_REQUIRED | Attribute: marketplaceId must be
    valid. Please specify valid eBay Marketplace ID for this request. |

    | 179 | EBAY_TOKEN_GENERATION_FAILED | Could not generate long lived eBay
    refresh token. Please retry request with new authorization code. |

    | 180 | EBAY_INVENTORY_LOCATION_ADDRESS_REQUIRED | Attribute: address is
    required. Please specify valid inventory location address for this request.
    |

    | 181 | EBAY_INVALID_INVENTORY_LOCATION_ADDRESS | Attribute: address is
    invalid. Could not create eBay inventory location using provided address.
    Please ensure address is valid for marketplace and try again. |

    | 182 | EBAY_DEFAULT_FULFILLMENT_POLICY_REQUIRED | Could not find default
    fulfillment policy for given eBay marketplace. Please create policy within
    eBay and then try your request again. |

    | 183 | EBAY_DEFAULT_RETURN_POLICY_REQUIRED | Could not find default return
    policy for given eBay marketplace. Please create policy within eBay and then
    try your request again. |

    | 184 | EBAY_DEFAULT_PAYMENT_POLICY_REQUIRED | Could not find default
    payment policy for given eBay marketplace. Please create policy within eBay
    and then try your request again. |

    | 185 | EBAY_SESSION_ID_REQUIRED | Arrtibue: sessionId cannot be empty.
    Please specify eBay Session ID for this request. |

    | 186 | EBAY_AUTH_TOKEN_GENERATION_FAILED | Could not generate long lived
    eBay auth token. Please retry request with new session ID. |

    | 187 | INVALID_ORDER_TOTAL_SHIPPING_PRICE | Order total shipping price must
    be a number greater than or equal to zero. |

    | 188 | INVALID_ORDER_TOTAL_SHIPPING_TAX | Order total shipping tax must be
    a number greater than or equal to zero. |

    | 189 | INVALID_LINE_ITEM_SHIPPING_PRICE | Line item shipping price must be
    a number greater than or equal to zero. |

    | 190 | INVALID_LINE_ITEM_SHIPPING_TAX | Line item shipping tax must be a
    number greater than or equal to zero. |

    | 191 | INVALID_SUPPLIER_FILE_SETTINGS_OPTIONS_VALUE | Non-empty value is
    required for supplier file settings options mapping. |

    | 192 | INVALID_SUPPLIER_FILE_SETTINGS_ADDITIONAL_FIELDS_VALUE | Non-empty
    value is required for supplier file settings additional fields mapping. |

    | 193 | WALMART_CONSUMER_CHANNEL_TYPE_REQUIRED | Attribute:
    consumerChannelType is required. Please specify Consumer Channel Type for
    this request. |

    | 194 | INVENTORY_ITEM_USED_BY_VARIANT_REFERENCE | Inventory item cannot be
    deleted because it is currently being used by one or many variant
    references. |

    | 195 | INVALID_CHANNEL_OUTPUT_FILE_COLUMN_HEADER | Non-empty header is
    required for all channel output file columns. |

    | 196 | INVALID_CHANNEL_OUTPUT_FILE_COLUMN_FIELD | Field for one or more
    channel output file columns is invalid. |

    | 197 | INVALID_CHANNEL_OUTPUT_FILE_COLUMN_KEY | Non-empty key is required
    for each optionalValue and additionalFieldValue field within channel output
    file columns. |

    | 198 | INVALID_CHANNEL_OUTPUT_FILE_COLUMN_INDEX | Valid index is required
    for each productImage and image field within channel output file columns. |

    | 199 | INVALID_SEARCH_FIELD_ORDINAL | Attribute: ordinal is invalid. Search
    Field ordinal must be greater than zero. |

    | 200 | INVALID_SEARCH_FIELD_PREFIX_ALREADY_EXISTS | Search Field Prefix
    already exists for business. |

    | 201 | INVALID_SEARCH_FIELD_PREFIX_MUST_BE_POPULATED | Attribute: prefix is
    required. Please specify search field prefix for this request. |

    | 202 | INVALID_SEARCH_FIELD_LABEL_ALREADY_EXISTS | Search Field Label
    already exists for business. |

    | 203 | INVALID_SEARCH_FIELD_LABEL_MUST_BE_POPULATED | Attribute: label is
    required. Please specify search field label for this request. |

    | 204 | ORDINAL_NOT_FOUND | Requested search field with ordinal not found
    for business. |

    | 207 | API_ACCOUNT_NOT_FOUND | Requested API Account with id not found for
    business. |

    | 208 | API_ACCOUNTS_FORBIDDEN_TO_CREATE_BUSINESSES | API Accounts are
    forbidden from creating businesses. |

    | 209 | API_RATE_LIMIT_EXCEEDED | You have exceeded the rate limit for your
    business. Try again in a moment. |

    | 210 | API_ACCOUNTS_FORBIDDEN_TO_CREATE_API_ACCOUNTS | API Accounts are
    forbidden from creating other API Accounts. |

    | 211 | API_ACCOUNTS_FORBIDDEN_TO_DELETE_API_ACCOUNTS | API Accounts are
    forbidden from deleting other API Accounts. |

    | 212 | LOCATIONS_NEED_TO_BE_RETRIEVED_USING_A_VALID_SHOPIFY_INTEGRATION |
    Locations can only be retrieved from a valid Shopify Integration. |

    | 213 | INVALID_CHANNEL_ID | Attribute: channelId is required. Please
    specify field channelId for this request. |

    | 214 | LINE_ITEM_MUST_EXIST_ON_THE_ORDER | Line Item must exist on the
    order. |

    | 215 | REPORT_NOT_FOUND | Requested report with embed code not found. |

    | 216 | INVALID_FULFILLMENT_SHIPPED_AT_DATE | Fulfillment shipped at date is
    invalid. Must be a valid ISO 8601 formatted date. |

    | 217 | INVALID_ACTIVITY_OPERATION | Attribute: operation is invalid.
    Operation must be CREATE, UPDATE, or DELETE. |

    | 218 | INVALID_ACTIVITY_RESULT | Attribute: result is invalid. Result must
    be SUCCESS, ERROR, WARNING, or UNCHANGED. |

    | 219 | INVALID_ACTIVITY_MESSAGE_TITLE | Attribute: title is invalid.
    Activity Message Title is required on messages and must be 100 characters or
    less. |

    | 220 | INVALID_ACTIVITIY_MESSAGE_DESCRIPTION | Attribute: description is
    invalid. Activity Message Description is required on messages and must be
    1000 characters or less. |

    | 221 | TOO_MANY_ACTIVITY_MESSAGES | Attribute: messages is invalid.
    Exceeded limit of 20 messages per activity. |

    | 220 | INVALID_ACTIVITIY_MESSAGE_DESCRIPTION | Attribute: description is
    invalid. Activity Message Description is required on messages and must be
    1000 characters or less. |

    | 221 | TOO_MANY_ACTIVITY_MESSAGES | Attribute: messages is invalid.
    Exceeded limit of 20 messages per activity. |

    | 222 | INVALID_SHOPIFY_REQUEST | Attempt to update Shopify resulted in bad
    request. |

    | 223 | UNAUTHORIZED_SHOPIFY_REQUEST | Attempt to update Shopify resulted in
    unauthorized request. |

    | 224 | INVALID_SHOPIFY_ORDER_SHIPPING_ADDRESS | Attempt to update Shopify
    order shipping address resulted in bad request. |

    | 225 | UNABLE_TO_SYNC_SHOPIFY_CUSTOMER | Shopify customer can not be
    synchronized because the shopify order does not have a customer. |

    | 226 | INVALID_EMBED_CODE | Attribute: embedCode is invalid. Embed code is
    required. |

    | 227 | USER_DOES_NOT_HAVE_ACCESS_TO_ANALYTICS | User does not have
    permissions to access analytics. |

    | 228 | PLAYBOOK_STEP_NOT_FOUND | Playbook Step could not be found. |

    | 229 | INVALID_PLAYBOOK_STEP_NAME | Attribute: name is required. Please
    specify a non-empty Playbook Step Name for this request. |

    | 230 | DUPLICATE_PLAYBOOK_STEP_NAME | Attribute: name must be unique across
    all steps. Playbook Step Name must be unique across all Playbook Steps. |

    | 231 | INVALID_PLAYBOOK_STEP_ENVIRONMENT_VARIABLE_KEY_NAME | Attribute:
    environmentVariableKeys cannot contain duplicate or empty names. Name must
    be unique across all environment variable keys in the Playbook Step. |

    | 232 | INSUFFICIENT_PLAYBOOK_ADMIN_PERMISSIONS | Only Playbook
    Administrators are allowed to perform this action. |

    | 233 | INVALID_STEP_SETTINGS_VERSION | Attribute: version is invalid.
    Version must be PRODUCTION, STAGING, or TEST |

    | 234 | INVALID_STEP_ENVIRONMENT_VARIABLE | Attribute: environmentVariables
    are not valid for the provided step. |

    | 235 | STEP_ID_REQUIRED | Attribute: step id is required. Please specify a
    non-empty Playbook Step ID for this request. |

    | 236 | INVALID_ORDER_QUERY_PURCHASED_AT_MIN_INTERVAL | Attribute:
    purchasedAtMaxIntervalMinutes must be a valid positive number. |

    | 237 | INVALID_ORDER_QUERY_PURCHASED_AT_MAX_INTERVAL | Attribute:
    purchasedAtMinIntervalMinutes must be a valid positive number. |

    | 238 | INVALID_ORDER_QUERY_PURCHASED_AT_RANGE | Order Query Range is
    invalid. purchasedAtMinIntervalMinutes must be greater than
    purchasedAtMaxIntervalMinutes. |

    | 239 | STEP_SETTINGS_NOT_PERMITTED_FOR_INTEGRATION | Attribute:
    stepSettings are only allowed for step integration. |

    | 240 | STEP_INVOCATIONS_NOT_PERMITTED_FOR_INTEGRATION | Steps can only be
    invoked by a step integration. |

    | 241 | STEP_INVOCATION_FAILED | Step invocation has failed for the given
    message. |

    | 242 | BUSINESS_ID_REQUIRED | Attribute: businessId is required. Please
    specify a non-empty valid Business ID for this request. |

    | 243 | INVALID_LOCATION_NAME | Attribute: name is invalid. Please specify a
    non-empty valid location name less than 256 characters for this request. |

    | 244 | LOCATION_WITH_NAME_ALREADY_EXISTS | Attribute: name is invalid.
    Location name must be unique to the business. |

    | 245 | LOCATION_NOT_FOUND | Location could not be found. |

    | 246 | INVALID_INVENTORY_ITEM_SKU | Attribute: sku is invalid. Please
    specify a non-empty valid SKU less than 101 characters for this request. |

    | 247 | INVALID_INVENTORY_ITEM_TITLE | Attribute: title is invalid. Please
    specify a non-empty valid title less than 256 characters for this request. |

    | 248 | INVENTORY_ITEM_WITH_SKU_ALREADY_EXISTS | Attribute: sku is invalid.
    Inventory Item sku must be unique to the business. |

    | 249 | INVALID_QUANTITY_ADJUSTMENT | Attribute: quantity is invalid.
    Adjustment must be a valid number greater or equal to -500000000 or less
    than or equal to 500000000. |

    | 250 | INVALID_INVENTORY_QUANTITY_STATUS | Attribute: inventoryStatus is
    invalid. Please specify a non-empty valid inventoryStatus for this request.
    |

    | 251 | INVALID_ADJUSTMENT_EFFECTIVE_DATE | Attribute: effectiveDate is
    invalid. Must be a valid ISO 8601 formatted date. |

    | 252 | INVALID_MEMO | Attribute: memo is invalid. Memo cannot be more than
    1000 characters. |

    | 253 | INVALID_TOTAL_ADJUSTED_QUANTITY | Total Quantity for an inventory
    item cannot be adjusted to greater than 1000000000 or less than -1000000000.
    |

    | 254 | INVALID_LOCATION_ID | Attribute: locationId is invalid. Please
    specify a non-empty valid locationId for this request. |

    | 255 | QUANTITY_STATUS_NOT_FOUND | Quantity status could not be found. |

    | 256 | IDEMPOTENT_KEY_IS_REQUIRED | A unique X-Channel-Ape-Idempotent-Key
    header is required for this request. |

    | 257 | INVALID_MAXIMUM_CONCURRENT_CONNECTION_SETTING | Maximum concurrent
    connections is invalid. |

    | 258 | INVALID_RESTOCK_TYPE | Attribute: restockType on refund is invalid.
    Must be NO_RESTOCK, CANCEL, or RETURN. |

    | 259 | INVALID_SUPPLIER_REFUND_RESTOCK_TYPE | Attribute: restockType on
    refund line item is invalid. Supplier Refund Line Items must have NO_RESTOCK
    restock type. |

    | 260 | INVALID_UPDATED_LINE_ITEM_QUANTITY | Attribute: quantity on line
    item is invalid. It must be greater than or equal to the existing quantity
    to update a line item. |

    | 261 | LINE_ITEMS_REQUIRED_FOR_UPDATE | Attribute: lineItems is invalid. At
    least all existing line items must be provided to update the line items of
    the order. |

    | 262 | INVALID_UPDATED_LINE_ITEM_SKU | Attribute: sku on line item is
    invalid. It must match existing sku to update a line item. |

    | 263 | INVALID_FULFILLMENT_LOCATION_ID | Attribute: locationId on
    fulfillment is invalid. Location must exist on the same business as the
    order. |

    | 264 | DUPLICATE_CHANNEL_LOCATION_ID | Attribute: locationId is invalid. A
    channel with that location is already configured for your business. |

    | 265 | INVALID_COMMITTED_QUANTITY | Total Committed Quantity for an
    inventory item cannot be adjusted to less than 0. |

    | 266 | INVALID_UPDATED_AT_START_DATE | Updated at start date parameter is
    invalid. Must be a valid ISO 8601 formatted date after the start date. |

    | 267 | INVALID_UPDATED_AT_END_DATE | Updated at end date parameter is
    invalid. Must be a valid ISO 8601 formatted date after the start date and
    updated at start date. |

    | 268 | INVALID_ORDER_QUERY_UPDATED_AT_MIN_INTERVAL | Attribute:
    updateAtMaxIntervalMinutes must be a valid positive number. |

    | 269 | INVALID_ORDER_QUERY_UPDATED_AT_MAX_INTERVAL | Attribute:
    updateMinIntervalMinutes must be a valid positive number. |

    | 270 | INVALID_ORDER_QUERY_UPDATED_AT_RANGE | Order Query Range is invalid.
    updatedAtMinIntervalMinutes must be greater than
    updatedAtMaxIntervalMinutes. |

    | 271 | INVALID_ORDER_QUERY_PURCHASED_AND_UPDATED_AT_RANGE | Order Query
    Range is invalid. purchasedAtMinIntervalMinutes must be greater than
    updatedAtMaxIntervalMinutes. |

    | 272 | INVALID_TAX_PRICE | Tax price must be a number greater than or equal
    to zero. |

    | 273 | INVALID_TAX_RATE | Tax Rate is invalid. Optional tax rate field must
    be a decimal. |

    | 274 | INVALID_TAX_TITLE | Tax Title is invalid. Tax titles have a maximum
    length of 255 characters. |

    | 275 | INVALID_REFUND_TRANSACTION_ID | Refund Transaction ID is invalid.
    Transaction ID is a required field. |

    | 276 | INVALID_REFUND_TRANSACTION_MESSAGE | Refund Message is invalid.
    Refund transaction messages have a maximum length of 255 characters. |

    | 277 | INVALID_REFUND_TRANSACTION_AMOUNT | Refund Transaction Amount must
    be a number. |

    | 278 | INVALID_REFUND_TRANSACTION_STATUS | Refund Transaction Status is
    invalid. Please specify PENDING, SUCCESS, FAILURE, ERROR. |

    | 279 | INVALID_REFUND_ADJUSTMENT_ID | Refund Adjustment ID is invalid.
    Adjustment ID is a required field. |

    | 280 | INVALID_REFUND_ADJUSTMENT_REASON | Adjustment Reason is invalid.
    Refund adjustment messages have a maximum length of 255 characters. |

    | 281 | INVALID_REFUND_ADJUSTMENT_AMOUNT | Refund Adjustment Amount must be
    a number. |

    | 282 | INVALID_REFUND_ADJUSTMENT_TAX_AMOUNT | Refund Adjustment Tax Amount
    is invalid. Optional refund adjustment tax amount field must be a number. |

    | 283 | MISSING_REQUIRED_REFUND_ATTRIBUTES | Refund is invalid. Refunds
    cannot be empty. Provide at least one of lineItems, transactions, or
    adjustments. |

    | 284 | INVALID_PLAYBOOK_PLAY_NAME | Attribute: name is required. Please
    specify a non-empty Playbook Play Name for this request. |

    | 285 | INVALID_PLAY_NAME | Attribute: Play Name is invalid. Play Name
    Should have a maximum length of 100 characters. |

    | 287 | PLAYBOOK_PLAY_NOT_FOUND | Playbook Play could not be found. |

    | 288 | DUPLICATE_PLAYBOOK_PLAY_NAME | Attribute: name must be unique across
    all plays. Playbook Play Name must be unique across all Playbook Plays. |

    | 289 | PLAY_SETTINGS_NOT_PERMITTED_FOR_INTEGRATION | Attribute:
    playSettings are only allowed for step integration. |

    | 290 | PLAY_ID_REQUIRED | Attribute: playId is required. Please specify a
    non-empty Playbook Play ID for this request. |

    | 291 | INVALID_ON_ORDER_QUANTITY | Total On-Order Quantity for an inventory
    item cannot be adjusted to less than 0. |

    | 292 | INVALID_RESERVE_QUANTITY | Total Reserve Quantity for an inventory
    item cannot be adjusted to less than 0. |

    | 293 | DUPLICATE_PLAYBOOK_PLAY_ENVIRONMENT_VARIABLE_NAME | Attribute:
    environmentVariables are duplicated. Environment variable names must be
    unique per play supplier. |

    | 294 | MISSING_PLAYBOOK_PLAY_ENVIRONMENT_VARIABLE | Attribute:
    environmentVariables are missing for the provided play. |

    | 295 | INVALID_PLAYBOOK_PLAY_ENVIRONMENT_VARIABLE | Attribute:
    environmentVariables are not valid for the provided play. |

    | 296 | INVALID_STATE_DEFINITION | The play does not currently have a valid
    definition. Please update the play to have a valid definition and retry your
    request. |

    | 297 | INVALID_PLAYBOOK_PLAY_ENVIRONMENT_VARIABLE_NAME | Attribute:
    environmentVariable names are not valid for the provided play. Environment
    variable name is required. |

    | 298 | DUPLICATE_SHOPIFY_CHANNEL_LOCATION_ID | Attribute: locationId is
    invalid. Location is already set for a Shopify channel on this business.
    Location cannot be set for multiple Shopify Channels on the same business. |
servers:
  - url: https://api.channelape.com
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
tags:
  - name: Actions
    description: >-
      An action is a process by which ChannelApe accomplishes tasks. An
      inventory action might update inventory quantities across all
      marketplaces, thus performing specific tasks.
  - name: Analytics
    description: Analytics expose numerous reports for embedding within an app.
  - name: Batches
    description: >-
      Allows for ingestion of large amounts of data into ChannelApe in the form
      of batch requests. Business are limited to 25% of their API Account Rate
      Limit when processing batches concurrently (i.e. a rate limit of 5 calls
      per second can process 1 batch process at a time). Subsequent batch
      requests will be queued up and processed in order of being received.
  - name: Businesses
    description: >-
      A business in ChannelApe refers to an account created to access the
      platform. Some customers choose to create a separate business for each
      sales channel, while others group all their channels under a single
      business. This allows for logical grouping of orders, channels, inventory,
      and suppliers within the platform. Additionally, some customers may choose
      to segregate their businesses based on geographic location, such as North
      America versus Europe. Each business can have multiple users, allowing
      different business members to be added to each business.
  - name: Channels
    description: >-
      Channel references the marketplaces, affiliate networks, or partners that
      ChannelApe can interact with to distribute your catalog or to retrieve
      orders from and sync inventory to. Some examples of a channel would be
      Shopify Store, Amazon, or NetSuite B2B Orders.
  - name: File Previews
  - name: Integrations
  - name: Locations
    description: >-
      Inventory locations are physical locations where inventory items are
      stored, such as a warehouse.
  - name: Logging Payloads
  - name: Inventories
    description: >-
      Representation of a physical SKU. When assosciated with a location,
      quantities can be set, adjusted, and retrieved for 1 or many quantity
      statuses.
  - name: Inventories > Quantities
    description: Modify quantities at given location/status for an inventory item.
  - name: Orders
    description: >-
      An order is transaction that was placed on either your website or
      marketplace. Using the ChannelApe API you could query orders by business
      and retrieve orders from every channel we support in a unified format.


      For more details on the ChannelApe order model, please check out our
      knowledgebase
      [here](https://www.channelape.com/support/knowledgebase/channelape-order/).
  - name: Order Activities
    description: >-
      Activities can be used to record things about an order. ChannelApe records
      all successful and error activities automatically, but individual
      integrations may have the need to record custom warning or information
      actions on an order.
  - name: Product Blocks
  - name: Product Filters
  - name: Product Modifiers
  - name: Product Pushes
  - name: Products
    description: >-
      A product is an inventory item located in your catalog. Products are
      usually listed for sale on a marketplace such as Amazon or Ebay.
  - name: Recipes
    description: >-
      Recipes are used to create automations within the ChannelApe platform.
      Recipes can be triggered via a schedule or the completion of an action.
  - name: Schedules
  - name: Steps
    description: >-
      Resources for Playbook Plays


      A play is an ordered execution of steps to achieve some high level
      business goal.
  - name: Plays
    description: >-
      Resources for Playbook Steps.


      A play is a sequence of steps that are executed to achieve a business
      goal(s).
  - name: Search Fields
    description: >-
      Search Fields are used in channelape to render custom fields on the search
      page to provide a customized search experience for business users. The
      label is rendered next to a search box that will autocomplete for any
      variants that have tags that start with the prefix and the user input.
  - name: Subscriptions
  - name: Suppliers
  - name: Suppliers > Inventories
    description: Inventory Items tied to a Supplier.
  - name: Suppliers > Invocations
  - name: Users
  - name: Variant References
  - name: Variants
    description: >-
      A variant is a specific version (SKU) of your products in your catalog. If
      your product is a T-Shirt, variants would be the different sizes or
      colors. The T-shirt could also be known as the parent and the different
      colors and sizes would be known as children.
  - name: Variants Search
paths:
  /v1/actions/{action_id}:
    get:
      tags:
        - Actions
      summary: Get action
      description: >-
        Retrieves an action by ID.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Action successfully retrieved.  |

        | 404| Action with ID does not exist or you do not have access to the
        business the action belongs to. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: action_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/actions:
    get:
      tags:
        - Actions
      summary: Query actions by business
      description: >-
        Query actions for a given business.


        Required query parameters

        ---

        __businessId__ - ID of ChannelApe business


        Optional query parameters

        ---

        __startDate__ - ISO 8601 date string (defaults to epoch time). Used to
        filter results after given purchase date.


        __endDate__ - ISO 8601 date string (defaults to current time). Used to
        filter results before given purchase date.


        __lastKey__ - ID returned on previous page of results. Used to retrieve
        next page of results when results are paginated.


        __size__ - Integer between 1 and 250 (defaults to 50). Maximum number of
        results to return.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Action successfully retrieved.  |

        | 400 | Start date and/or end date is invalid.  |

        | 404 | Business does not exist or you do not have access to the
        business. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: size
          in: query
          schema:
            type: integer
          example: '5'
        - name: endDate
          in: query
          schema:
            type: string
          example: '2016-03-23T12:42:21.338Z'
        - name: businessId
          in: query
          schema:
            type: string
          example: '{{business_id}}'
        - name: startDate
          in: query
          schema:
            type: string
          example: '2016-03-01T12:41:21.338Z'
        - name: lastKey
          in: query
          schema:
            type: string
          example: '{{last_key}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/actions/{action_id}/error:
    put:
      tags:
        - Actions
      summary: Update action with error
      description: >
        Sets processing status to error for an in progress action. This will
        allow a new action to run with the same target if it is queued.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Action successfully updated with error processing status.  |

        | 400 | Action has already been completed. |

        | 404 | Action with ID does not exist or you do not have access to the
        business the action belongs to. |
      requestBody:
        content: {}
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: action_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/actions/{action_id}/healthcheck:
    put:
      tags:
        - Actions
      summary: Update action health check
      description: >
        Updated action health check which keeps action from automatically
        updating to an error processing status. Action will automatically update
        to error processing status if health check interval * 2 + 1 minute is
        exceeded without a health check update.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Successfully updated last health check for action. |

        | 400 | Action has already been completed. |

        | 404 | Action with ID does not exist or you do not have access to the
        business the action belongs to. |
      requestBody:
        content: {}
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: action_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/actions/{action_id}/complete:
    put:
      tags:
        - Actions
      summary: Complete action
      description: >
        Complete an in progress action. This will allow a new action to run with
        the same target if it is queued.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Action successfully updated with completed processing status. |

        | 400 | Action has already been completed. |

        | 404 | Action with ID does not exist or you do not have access to the
        business the action belongs to. |
      requestBody:
        content: {}
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: action_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/analytics:
    get:
      tags:
        - Analytics
      summary: Retrieve a list of available analytics
      description: |-
        HTTP Status Codes
        ---
        |Status  | Meaning |
        |--|--|
        | 200 | Analytics list successfully retrieved.  |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v2/analytics:
    post:
      tags:
        - Analytics
      summary: Generate embed URL
      description: |-
        Generates an embed URL for a report.

        Required Fields
        ---
        __embedUrl__ - Location of report.

        __timezone__ - Default timezone to run reports in.

        HTTP Status Codes
        ---
        |Status  | Meaning |
        |--|--|
        | 201 | Temporary embed URL has been created for report.  |
        | 400| Embed URL or Timezone is invalid. |
        | 403| User does not have peremission to access analytics. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                timezone: America/New_York
                embedCode: dashboard/1
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/batches:
    post:
      tags:
        - Batches
      summary: Create a new batch
      description: >-
        Triggers a new async batch. Default type is INVENTORY so you must
        provide the list of adjustments.


        Only basic validation is done at the time the batch is received, such as
        checking for null values. All other validation happens down stream when
        the batch is being processed.


        ## Fields


        **businessId** - Business where the batch should be run.


        **adjustments** - If batch type is INVENTORY, then list of adjustments
        that will be made during the batch. Maximum limit is 4000 adjustments or
        a 1MB request size. If more than 4000 adjustments/1MB request body are
        needed, the request should be split up into multiple batches.


        - **idempotentKey** - A unique key designated for the individual
        adjustment. Adjustments are deduplicated and not made when there is a
        duplicate idempotent key. This is to prevent duplicate adjustments being
        made in the system.

        - **inventoryItemId** - A ChannelApe system inventory item id. Must
        provide either this or sku.

        - **sku** - A sku that may or may not exist in ChannelApe. If the sku
        doesn't exist during a batch run, it will be created when the batch is
        run.

        - **locationId** - A ChannelApe location ID of where the adjustment
        should be made.

        - **inventoryStatus** - The status for the adjustment

        - **quantity** - The quantity of the adjustment. The end result of the
        adjustment will depend on the operation.

        - **operation** - Whether or not you want to overwrite the existing
        value(SET) or adjust relative(ADJUST)

        - **aggregateChannelSync** (optional)- true or false (default). If
        specified as true, the side affects of making adjustments to parent
        locations will happen. See the side effects section under "Adjust
        inventory item quantity" heading.

        - **memo** - An optional field to that describes why an adjustment is
        being made.
            

        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 201 | Batch has been created. Async processing will begin |

        | 400 | Invalid fields |

        | 403 | User does not have permission to trigger the batch for that
        business |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                businessId: 938a69a8-9ef2-4faa-b485-dad486aba56e
                adjustments:
                  - idempotentKey: '123456789'
                    inventoryItemId: '703'
                    quantity: 10
                    operation: ADJUST
                    locationId: 51
                    inventoryStatus: ON_ORDER
                    aggregateChannelSync: true
                    memo: Reason the adjustment was made.
                  - idempotentKey: '123456789'
                    inventoryItemId: '703'
                    quantity: 12
                    operation: SET
                    locationId: 51
                    inventoryStatus: COMMITTED
                    memo: Reason the adjustment was made.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                type: object
              example:
                id: 325bd7f2-272a-4212-9abb-59ffeaddb5ab
                type: INVENTORY
                status: READY
                createdAt: '2022-04-19T02:35:17.000Z'
                updatedAt: '2022-04-19T02:35:17.000Z'
                businessId: 938a69a8-9ef2-4faa-b485-dad486aba56e
  /v1/batches/{$guid}:
    get:
      tags:
        - Batches
      summary: Retrieve Batch Information
      description: |-
        Retrieve information from an individual batch

        ## HTTP Status Codes

        | Status | Meaning |
        | --- | --- |
        | 200 | Batch ID found and returned |
        | 404 | Batch Not Found |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                id: '{{$guid}}'
                type: INVENTORY
                status: COMPLETE
                createdAt: '2022-04-05T14:01:19.000Z'
                updatedAt: '2022-04-18T19:16:06.000Z'
                businessId: 938a69a8-9ef2-4faa-b485-dad486aba56e
        '404':
          description: Not Found
          headers:
            Server:
              schema:
                type: string
                example: awselb/2.0
            Date:
              schema:
                type: string
                example: Tue, 19 Apr 2022 02:53:22 GMT
            Content-Type:
              schema:
                type: string
                example: application/json
            Content-Length:
              schema:
                type: integer
                example: '98'
            Connection:
              schema:
                type: string
                example: keep-alive
            Access-Control-Allow-Headers:
              schema:
                type: string
                example: '*'
            Access-Control-Allow-Methods:
              schema:
                type: string
                example: OPTIONS,POST,PUT,GET,DELETE,PATCH
            Access-Control-Allow-Origin:
              schema:
                type: string
                example: '*'
          content:
            application/json:
              schema:
                type: object
              example:
                errors:
                  - message: Batch could not be found
  /v1/businesses/{business_id}/members:
    post:
      tags:
        - Businesses
      summary: Add Business Member
      description: >-
        Add verified user to a business by providing their username. Only the
        business owner can add other members.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                username: '{{username}}'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: business_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/businesses/{business_id}:
    get:
      tags:
        - Businesses
      summary: Get Business
      description: Retrieve infomation about the business.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: business_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    put:
      tags:
        - Businesses
      summary: Update Business
      description: >-
        Update the name and/or timeZone of a business. Only the business owner
        can update the business.


        Required Request Fields

        ---

        __name__ - Name of your business. Can be updated later.


        __timeZone__ - TimeZone your business operates under. Will change how
        dashboards render along with what times you see for recipe schedules in
        the app. API stores all values in UTC/GMT. Can be updated later.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                name: Jim's Vitamins
                timeZone: America/Atka
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: business_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/businesses:
    get:
      tags:
        - Businesses
      summary: Get Businesses for User
      description: Retrieve all businesses belonging to the given user.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: userId
          in: query
          schema:
            type: string
          example: '{{user_id}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/businesses/{business_id}/members/{user_id}:
    delete:
      tags:
        - Businesses
      summary: Delete Business Member
      description: >-
        Remove a user from the business. Only the business owner can remove
        other members.


        __Note:__ Business owner cannot be removed from the business.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: business_id
          in: path
          schema:
            type: string
          required: true
        - name: user_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/businessmemberverifications/{business_member_verification_token}:
    get:
      tags:
        - Businesses
      summary: Verify Business Member
      description: >-
        Once a business owner adds a member to the business, they need to verify
        their membership using this call and the token emailed to them.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: business_member_verification_token
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/businesses/:
    post:
      tags:
        - Businesses
      summary: Create Business
      description: >-
        Create a new business.


        Required Request Fields

        ---

        __name__ - Name of your business. Can be updated later.


        __timeZone__ - TimeZone your business operates under. Will change how
        dashboards render along with what times you see for recipe schedules in
        the app. API stores all values in UTC/GMT. Can be updated later.


        __alphabeticCurrencyCode__ - ISO 4217 currency code used by your
        business. All supplier inventory items will assume this currency. When
        an order is placed with an uknown currency, this currency will be
        assumed.


        __inventoryItemKey__ - Valid values are "SKU" or "UPC". Cannot be
        changed once business is created. Unique identifier for all inventory
        items under a supplier. Duplicate inventory item keys for a given
        supplier will be ommitted.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                name: Jill's Supplement Store
                timeZone: America/New_York
                alphabeticCurrencyCode: USD
                inventoryItemKey: SKU
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/businesses/ab35b656-cdb8-44bc-b191-720fef08db32/apiaccounts/ef77d913-074b-4244-9eac-9a6d52cd142e:
    get:
      tags:
        - Businesses
      summary: Get API Account
      description: Retrieve detailed information about a given API Account for a business.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /080/v1/businesses/ab35b656-cdb8-44bc-b191-720fef08db32/apiaccounts:
    get:
      tags:
        - Businesses
      summary: Get Businesses API Accounts
      description: Retrieve a list of API Accounts for a business.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/channels/:
    post:
      tags:
        - Channels
      summary: Create custom export channel
      description: >
        Create a Custom Export Channel for a business.


        # Required Fields

        __businessId__ - ID for ChannelApe business that channel should be
        created for.


        __integrationId__ - ID for Custom Export Channel. Must match ChannelApe
        Exporter integration ID (02df0b31-a071-4791-b9c2-aa01e4fb0ce6).


        __name__ - Needs to be unique across all channels for the business.


        # Optional Fields

        __enabled__ - Indicates whether the channel is installed. Uninstalled
        channels cannot run actions. Defaults to _false_.


        __settings__ - Map with multiple optional values.


        * __allowRead__ - Allow ChannelApe to read existing products and
        variants from this channel. Defaults to _true_.


        * __priceType__ - Which price variant price field _retail_ or
        _wholesale_ that ChannelApe will use when creating or updating variants
        on this channel. Defaults to _retail_.


        * __outputFile__ - Map with multiple optional values to indicate file
        format.
            
            * __header__ - Whether the output file should contain a header row consisting of _column header_ values. Defaults to _true_.
            * __columns__ - List of columns to write to output file. Defaults to empty list.
                * __header__ - Value used for column header. Required field with no default.
                * __field__ - Indicates ChannelApe product or variant field should be outputted for this column. Valid values are:
                    * productId
                    * inventoryItemValue
                    * sku
                    * upc
                    * productTitle
                    * produtDescription
                    * productPrimaryCategory
                    * productSecondaryCategory
                    * productVendor
                    * optionValue
                    * productImage
                    * productOptionKeys - Sorted alphabetically and comma separated
                    * productTags - Sorted alphabetically and comma separated
                    * productCreatedAt
                    * productUpdatedAt
                    * title
                    * description
                    * primaryCategory
                    * secondaryCategory
                    * vendor
                    * quantity
                    * weight
                    * alphabeticCurrencyCode
                    * retailPrice
                    * wholesalePrice
                    * condition
                    * image
                    * tags - Sorted alphabetically and comma separated
                    * additionalFieldValue
                    * variantCreatedAt
                    * variantUpdatedAt
                * __index__ - Only applicable for _productImage_ and _image_ fields. Indicates index (starting at 0) of image within images list. Return null if index does not exist.
                * __key__ - Only appicable for _optionValue_ and _additionalFieldValue_ fields. Indicates key within map to retrieve. Returns null if key does not exist.
                * __value__ - Static value to be written to each cell in the column. Only valid when _field_ is empty.
                * __unitOfMeasurement__ - Only applicable for _weight_ field. Indicates what unit to output variant weight in. Defaults to grams. Valid values are:
                    * oz - Ounces
                    * lb - Pounds
                    * g - Grams
                    * kg - Kilograms
                    * t - Metric Tonnes

        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 201 | Successfully created channel for business. |

        | 400 | Request body contains invalid fields. Check response errors list
        for more details. |

        | 403 | You are not a member of the business passed in the request body.
        |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                businessId: some-business-id
                integrationId: 02df0b31-a071-4791-b9c2-aa01e4fb0ce6
                enabled: true
                name: My Custom Export
                settings:
                  allowRead: true
                  priceType: retail
                  outputFile:
                    header: true
                    columns:
                      - header: Product ID
                        field: productId
                      - header: Variant ID
                        field: inventoryItemValue
                      - header: SKU
                        field: sku
                      - header: UPC
                        field: upc
                      - header: Length
                        value: '10'
                      - header: Product Title
                        field: productTitle
                      - header: Product Description
                        field: productDescription
                      - header: Product Primary Category
                        field: productPrimaryCategory
                      - header: Product Secondary Category
                        field: productSecondaryCategory
                      - header: Product Vendor
                        field: productVendor
                      - header: Option 1 Name
                        value: Size
                      - header: Option 1 Value
                        field: optionValue
                        key: Size
                      - header: Option 2 Name
                        field: optionValue
                        key: Flavor
                      - header: Option 2 Value
                        key: Flavor
                      - header: Color
                        field: optionValue
                        key: Color
                      - header: Product Image 1
                        field: productImage
                        index: 0
                      - header: Product Image 2
                        field: productImage
                        index: 1
                      - header: Thumbnail
                        field: productImage
                        index: 28
                      - header: Product Tags
                        field: productTags
                      - header: Description
                        field: description
                      - header: Primary Category
                        field: primaryCategory
                      - header: Secondary Category
                        field: secondaryCategory
                      - header: Vendor
                        field: vendor
                      - header: Quantity
                        field: quantity
                      - header: Pounds
                        field: weight
                        unitOfMeasurement: lb
                      - header: Grams
                        field: weight
                        unitOfMeasurement: g
                      - header: Ounces
                        field: weight
                        unitOfMeasurement: oz
                      - header: Weight
                        field: weight
                        unitOfMeasurement: kg
                      - header: Currency Code
                        field: alphabeticCurrencyCode
                      - header: Retail Price
                        field: retailPrice
                      - header: Wholesale Price
                        field: wholesalePrice
                      - header: Condition
                        field: condition
                      - header: Image 1
                        field: image
                        index: 0
                      - header: Image 2
                        field: image
                        index: 1
                      - header: Cover Image
                        field: image
                        index: 4
                      - header: Tags
                        field: tags
                      - header: Additional Field 1 Name
                        value: ebay_category_id
                      - header: Additional Field 1 Value
                        field: additionalFieldValue
                        key: ebay_category_id
                      - header: Name
                        value: jcpenny_title
                      - header: Value
                        field: additionalFieldValue
                        key: jcpenny_title
                      - header: Name
                        value: sears_title
                      - header: Value
                        field: additionalFieldValue
                        key: sears_title
                      - header: Amazon Quantity
                        field: additionalFieldValue
                        key: amz_quantity
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/channels/{channel_id}:
    put:
      tags:
        - Channels
      summary: Update custom export channel
      description: >
        Update a Custom Export Channel for a business.


        # Required Fields

        __name__ - Needs to be unique across all channels for the business.


        # Optional Fields

        __enabled__ - Indicates whether the channel is installed. Uninstalled
        channels cannot run actions. Defaults to _false_.


        __settings__ - Map with multiple optional values.


        * __allowRead__ - Allow ChannelApe to read existing products and
        variants from this channel. Defaults to _true_.


        * __priceType__ - Which price variant price field _retail_ or
        _wholesale_ that ChannelApe will use when creating or updating variants
        on this channel. Defaults to _retail_.


        * __outputFile__ - Map with multiple optional values to indicate file
        format.
            
            * __header__ - Whether the output file should contain a header row consisting of _column header_ values. Defaults to _true_.
            * __columns__ - List of columns to write to output file. Defaults to empty list.
                * __header__ - Value used for column header. Required field with no default.
                * __field__ - Indicates ChannelApe product or variant field should be outputted for this column. Valid values are:
                    * productId
                    * inventoryItemValue
                    * sku
                    * upc
                    * productTitle
                    * produtDescription
                    * productPrimaryCategory
                    * productSecondaryCategory
                    * productVendor
                    * optionValue
                    * productImage
                    * productOptionKeys - Sorted alphabetically and comma separated
                    * productTags - Sorted alphabetically and comma separated
                    * productCreatedAt
                    * productUpdatedAt
                    * title
                    * description
                    * primaryCategory
                    * secondaryCategory
                    * vendor
                    * quantity
                    * weight
                    * alphabeticCurrencyCode
                    * retailPrice
                    * wholesalePrice
                    * condition
                    * image
                    * tags - Sorted alphabetically and comma separated
                    * additionalFieldValue
                    * variantCreatedAt
                    * variantUpdatedAt
                * __index__ - Only applicable for _productImage_ and _image_ fields. Indicates index (starting at 0) of image within images list. Return null if index does not exist.
                * __key__ - Only appicable for _optionValue_ and _additionalFieldValue_ fields. Indicates key within map to retrieve. Returns null if key does not exist.
                * __value__ - Static value to be written to each cell in the column. Only valid when _field_ is empty.
                * __unitOfMeasurement__ - Only applicable for _weight_ field. Indicates what unit to output variant weight in. Defaults to grams. Valid values are:
                    * oz - Ounces
                    * lb - Pounds
                    * g - Grams
                    * kg - Kilograms
                    * t - Metric Tonnes

        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 201 | Successfully created channel for business. |

        | 400 | Request body contains invalid fields. Check response errors list
        for more details. |

        | 404 | Channel with ID does not exist or you do not have access to the
        business the action belongs to.  |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                enabled: true
                name: My Custom Export
                settings:
                  allowRead: true
                  priceType: wholesale
                  outputFile:
                    header: false
                    columns:
                      - header: Product ID
                        field: productId
                      - header: Variant ID
                        field: inventoryItemValue
                      - header: SKU
                        field: sku
                      - header: UPC
                        field: upc
                      - header: Length
                        value: '10'
                      - header: Product Title
                        field: productTitle
                      - header: Product Description
                        field: productDescription
                      - header: Product Primary Category
                        field: productPrimaryCategory
                      - header: Product Secondary Category
                        field: productSecondaryCategory
                      - header: Product Vendor
                        field: productVendor
                      - header: Option 1 Name
                        value: Size
                      - header: Option 1 Value
                        field: optionValue
                        key: Size
                      - header: Option 2 Name
                        field: optionValue
                        key: Flavor
                      - header: Option 2 Value
                        key: Flavor
                      - header: Color
                        field: optionValue
                        key: Color
                      - header: Product Image 1
                        field: productImage
                        index: 0
                      - header: Product Image 2
                        field: productImage
                        index: 1
                      - header: Thumbnail
                        field: productImage
                        index: 28
                      - header: Product Tags
                        field: productTags
                      - header: Description
                        field: description
                      - header: Primary Category
                        field: primaryCategory
                      - header: Secondary Category
                        field: secondaryCategory
                      - header: Vendor
                        field: vendor
                      - header: Quantity
                        field: quantity
                      - header: Pounds
                        field: weight
                        unitOfMeasurement: lb
                      - header: Grams
                        field: weight
                        unitOfMeasurement: g
                      - header: Ounces
                        field: weight
                        unitOfMeasurement: oz
                      - header: Weight
                        field: weight
                        unitOfMeasurement: kg
                      - header: Currency Code
                        field: alphabeticCurrencyCode
                      - header: Retail Price
                        field: retailPrice
                      - header: Wholesale Price
                        field: wholesalePrice
                      - header: Condition
                        field: condition
                      - header: Image 1
                        field: image
                        index: 0
                      - header: Image 2
                        field: image
                        index: 1
                      - header: Cover Image
                        field: image
                        index: 4
                      - header: Tags
                        field: tags
                      - header: Additional Field 1 Name
                        value: ebay_category_id
                      - header: Additional Field 1 Value
                        field: additionalFieldValue
                        key: ebay_category_id
                      - header: Name
                        value: jcpenny_title
                      - header: Value
                        field: additionalFieldValue
                        key: jcpenny_title
                      - header: Name
                        value: sears_title
                      - header: Value
                        field: additionalFieldValue
                        key: sears_title
                      - header: Amazon Quantity
                        field: additionalFieldValue
                        key: amz_quantity
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: channel_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Channels
      summary: Get channel
      description: >-
        Retrieve a single channel by ID.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Channel successfully retrieved.  |

        | 404| Channel with ID does not exist or you do not have access to the
        business the action belongs to. |
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: channel_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/channels:
    get:
      tags:
        - Channels
      summary: Get channels for business
      description: >-
        Retrieve all channels belonging to a business.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Channels successfully retrieved. If list is empty, businessId
        could be invalid or you are not a member of that business. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: '{{business_id}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/channels/{channel_id}/actions:
    post:
      tags:
        - Channels
      summary: Add manual action
      description: >-
        Start a manual action for a channel.


        # Required Fields

        __action__ - Name of action you wish to run for this channel. Must be an
        action listed for this integration.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 201 | Successfully created manual action for channel. |

        | 400 | action provided in request body is invalid or subscription for
        this business is invalid. |

        | 403 | You are not permitted to start an action for this channel. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                action: PRODUCT_PUSH
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: channel_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/filepreviews:
    post:
      tags:
        - File Previews
      summary: Create file preview
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                fileType: TSV
                url: ftp://ftp.example.com/test.txt
                authorization:
                  username: admin
                  password: admin
                headers: false
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/integrations/{integration_id}:
    get:
      tags:
        - Integrations
      summary: Get integration
      description: Retrieve integration information.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: integration_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/integrations:
    get:
      tags:
        - Integrations
      summary: Get integrations
      description: >-
        Retrieve all public integrations. Private supplier integrations that
        have already been installed can also be retrieved by passing the
        businessId query paramter.


        Optional Query Parameters

        ---

        __businessId__ - Needed to retrieve any private supplier integrations
        associated with business.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: '{{business_id}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/locations:
    post:
      tags:
        - Locations
      summary: Create Location
      description: >-
        ## Required Request Fields


        **name** - Name of your location. Can be updated later.


        **businessId** - The ChannelApe business ID to associate the location
        to.


        ## Optional Request Fields


        **aggregateLocationIds** - A list of other valid locations for your
        business. If an adjustment is made at one of the aggregate locations, an
        adjustment will be made on this location as well that is the sum of
        current ATP at each of the aggregate locations listed. The sum of the
        total ATP across the locations will be synchronized to the channel if it
        is a virtual location. Ideally the locations that have this will be your
        virtual location, and the list of aggregateLocationIds will be the
        warehouses you want to keep in sync with that virtual location. You can
        have up to 5 aggregate locations on a single location. An aggregate
        location also can not contain itself.


        Note: that you can't have nested aggregate locations. If a location has
        aggregate locations it can't be in a list of aggregate locations on
        another location. You can have a location listed across multiple
        aggregates.


        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 201 | Location has been created. |

        | 400 | One or more fields provided in the request body are invalid. |

        | 404 | Business could not be found. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                name: East Coast Warehouse
                businessId: 7790a7d0-2a53-4521-bde4-59ad32147edd
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
              examples:
                example-0:
                  summary: Create Location
                  value:
                    aggregateLocationIds: []
                    name: East Coast Warehouse
                    businessId: 7790a7d0-2a53-4521-bde4-59ad32147edd
                    createdAt: '2022-08-16T20:02:37.000Z'
                    errors: []
                    id: '87'
                    updatedAt: '2022-08-16T20:02:37.000Z'
                example-1:
                  summary: Create Virtual Location that has warehouse aggregates
                  value:
                    aggregateLocationIds:
                      - '85'
                      - '86'
                    name: Virtual Sales Channel
                    businessId: 7790a7d0-2a53-4521-bde4-59ad32147edd
                    createdAt: '2022-08-16T20:02:37.000Z'
                    errors: []
                    id: '87'
                    updatedAt: '2022-08-16T20:02:37.000Z'
        '400':
          content:
            application/json:
              schema:
                type: object
              example:
                errors:
                  - code: 324
                    message: >-
                      Attribute: aggregateLocationIds can not contain another
                      location that has aggregate locations.
    get:
      tags:
        - Locations
      summary: Get Locations for a business
      description: |
        Retrieves all locations for a business.

        HTTP Status Codes
        ---
        |Status  | Meaning |
        |--|--|
        | 200 | Locations have been retrieved.  |
        | 400 | One or more fields provided in the request are invalid. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: 7790a7d0-2a53-4521-bde4-59ad32147edd
      responses:
        undefined:
          content:
            application/json:
              schema:
                type: object
              example:
                locations:
                  - aggregateLocationIds: []
                    businessId: 7790a7d0-2a53-4521-bde4-59ad32147edd
                    createdAt: '2019-11-11T14:07:05.000Z'
                    errors: []
                    id: '123'
                    name: West Coast Warehouse
                    updatedAt: '2019-11-11T14:07:05.000Z'
                  - aggregateLocationIds: []
                    businessId: 7790a7d0-2a53-4521-bde4-59ad32147edd
                    createdAt: '2019-11-11T15:28:47.000Z'
                    errors: []
                    id: '124'
                    name: East Coast Warehouse
                    updatedAt: '2019-11-11T15:28:47.000Z'
                  - aggregateLocationIds:
                      - '123'
                      - '124'
                    businessId: 7790a7d0-2a53-4521-bde4-59ad32147edd
                    createdAt: '2020-07-10T16:00:31.000Z'
                    errors: []
                    id: '125'
                    name: Virtual Sales Channel
                    updatedAt: '2021-12-21T22:35:29.000Z'
  /v1/locations/123:
    put:
      tags:
        - Locations
      summary: Update Location
      description: >-
        Update the name of a location.


        ## Required Request Fields


        **name** - Name of your location.


        ## Optional Request Fields


        **aggregateLocationIds** - A list of other valid locations for your
        business. If an adjustment is made at one of the aggregate locations, an
        adjustment will be made on this location as well that is the sum of
        current ATP at each of the aggregate locations listed. The sum of the
        total ATP across the locations will be synchronized to the channel if it
        is a virtual location. Ideally the locations that have this will be your
        virtual location, and the list of aggregateLocationIds will be the
        warehouses you want to keep in sync with that virtual location. You can
        have up to 5 aggregate locations on a single location. An aggregate
        location also can not contain itself.


        Note: that you can't have nested aggregate locations. If a location has
        aggregate locations it can't be in a list of aggregate locations on
        another location. You can have a location listed across multiple
        aggregates.


        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 200 | Location has been updated. |

        | 400 | One or more fields provided in the request body are invalid. |

        | 404 | Location could not be found. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                name: West Coast Warehouse
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              examples:
                example-0:
                  summary: Update Location
                  value:
                    aggregateLocationIds: []
                    businessId: 7790a7d0-2a53-4521-bde4-59ad32147edd
                    createdAt: '2022-08-17T15:36:43.236Z'
                    errors: []
                    id: '123'
                    name: West Coast Warehouse
                    updatedAt: '2022-08-17T15:36:43.236Z'
                example-1:
                  summary: Update Virtual Location with warehouse aggregates
                  value:
                    aggregateLocationIds:
                      - '86'
                      - '87'
                    businessId: 7790a7d0-2a53-4521-bde4-59ad32147edd
                    createdAt: '2022-08-17T15:36:43.236Z'
                    errors: []
                    id: '123'
                    name: Virtual Sales Channel
                    updatedAt: '2022-08-17T15:36:43.236Z'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
              example:
                errors:
                  - code: 324
                    message: >-
                      Attribute: aggregateLocationIds can not contain another
                      location that has aggregate locations.
    get:
      tags:
        - Locations
      summary: Get Location
      description: |-
        Retrieves a single location by ID.

        HTTP Status Codes
        ---
        |Status  | Meaning |
        |--|--|
        | 200 | Location has been retrieved.  |
        | 404 | Location could not be found. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        undefined:
          content:
            application/json:
              schema:
                type: object
              example:
                aggregateLocationIds:
                  - '86'
                businessId: 7790a7d0-2a53-4521-bde4-59ad32147edd
                createdAt: '2022-08-17T15:36:43.000Z'
                errors: []
                id: '123'
                name: West Coast Warehouse
                updatedAt: '2022-08-17T15:38:03.000Z'
  /v1/locations/123/sla:
    put:
      tags:
        - Locations
      summary: Updating a location's SLA information
      description: >-
        Add SLA info about a Location


        ## Optional Fields


        **fulfillmentSLAHours** - The SLA for the location. This must be a
        number greater than 0 if provided.


        ## Operating Days if provided must require the following:


        **open** - The opening time for the location. Must be before 'end'


        **end** - The end of day for the location. Must be after 'open'


        **fulfillmentCutoffTime** - The time a location stops fulfilling items.
        Must be between 'open' and 'end', or equal to 'end'


        **day** - The day of week for the operating day. Must be one of the
        following:


        *   M - Monday

        *   T - Tuesday

        *   W - Wednesday

        *   R - Thursday

        *   F - Friday

        *   S - Saturday

        *   U - Sunday
            

        If you provide multiple of the same days, only one of them will be
        accepted.


        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 200 | Location SLA information has been created/updated. |

        | 400 | One or more fields provided in the request body are invalid. |

        | 404 | Location could not be found. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                fulfillmentSLAHours: '2'
                operatingDays:
                  - day: W
                    open: '08:00'
                    end: '10:00'
                    fulfillmentCutoffTime: '09:00'
                  - day: T
                    open: '08:00'
                    end: '10:00'
                    fulfillmentCutoffTime: '09:00'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        undefined:
          content:
            application/json:
              schema:
                type: object
              example:
                createdAt: '2019-12-17T17:46:25.000Z'
                errors: []
                fulfillmentSLAHours: '2'
                locationId: '123'
                operatingDays:
                  - createdAt: '2021-11-05T15:00:07.495Z'
                    day: W
                    end: '10:00'
                    fulfillmentCutoffTime: '09:00'
                    id: '4'
                    open: '08:00'
                    updatedAt: '2021-11-05T15:00:07.495Z'
                  - createdAt: '2021-11-05T15:00:07.495Z'
                    day: T
                    end: '10:00'
                    fulfillmentCutoffTime: '09:00'
                    id: '5'
                    open: '08:00'
                    updatedAt: '2021-11-05T15:00:07.495Z'
                updatedAt: '2021-11-05T15:00:07.495Z'
    get:
      tags:
        - Locations
      summary: Get a location's SLA information
      description: |-
        Retrieve SLA information for a location.

        HTTP Status Codes
        ---
        |Status  | Meaning |
        |--|--|
        | 200 | Location SLA information was retrieved. |
        | 404 | Location could not be found. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/locations/123/closures:
    put:
      tags:
        - Locations
      summary: Updating a location's closed dates
      description: >-
        Add Closed dates for a location. This should be holidays or dates that
        the location would otherwise be open in according to their SLA
        information


        Required Fields

        ---

        closedDays - A list of days that the location is closed. This is a PUT,
        so any days committed will be removed. The entire list needs to be
        provided during update.


        If you provide multiple of the same days, only one of them will be
        accepted.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Location closed days have been updated.  |

        | 400 | One or more fields provided in the request body are invalid. |

        | 404 | Location could not be found. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                closedDays:
                  - 2021/02/01
                  - 2021/03/01
                  - 2021/04/01
                  - 2021/05/01
                  - 2021/06/01
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                closedDays:
                  - createdAt: '2021-11-05T14:40:28.000Z'
                    date: 2021/02/01
                    id: '5'
                    updatedAt: '2021-11-05T14:55:30.697Z'
                  - createdAt: '2021-11-05T14:41:22.000Z'
                    date: 2021/05/01
                    id: '8'
                    updatedAt: '2021-11-05T14:55:30.697Z'
                  - createdAt: '2021-11-05T14:41:22.000Z'
                    date: 2021/04/01
                    id: '6'
                    updatedAt: '2021-11-05T14:55:30.697Z'
                  - createdAt: '2021-11-05T14:42:06.000Z'
                    date: 2021/06/01
                    id: '9'
                    updatedAt: '2021-11-05T14:55:30.697Z'
                  - createdAt: '2021-11-05T14:41:22.000Z'
                    date: 2021/03/01
                    id: '7'
                    updatedAt: '2021-11-05T14:55:30.697Z'
                errors: []
                locationId: '123'
    get:
      tags:
        - Locations
      summary: Get a location's closed dates
      description: |-
        Retrieve a list of Closed Dates for a location

        HTTP Status Codes
        ---
        |Status  | Meaning |
        |--|--|
        | 200 | Location closed dates was found.  |
        | 404 | Location could not be found. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        undefined:
          content:
            application/json:
              schema:
                type: object
              example:
                closedDays:
                  - createdAt: '2021-11-05T14:40:28.000Z'
                    date: 2021/02/01
                    id: '5'
                    updatedAt: '2021-11-05T14:55:30.697Z'
                  - createdAt: '2021-11-05T14:41:22.000Z'
                    date: 2021/05/01
                    id: '8'
                    updatedAt: '2021-11-05T14:55:30.697Z'
                  - createdAt: '2021-11-05T14:41:22.000Z'
                    date: 2021/04/01
                    id: '6'
                    updatedAt: '2021-11-05T14:55:30.697Z'
                  - createdAt: '2021-11-05T14:42:06.000Z'
                    date: 2021/06/01
                    id: '9'
                    updatedAt: '2021-11-05T14:55:30.697Z'
                  - createdAt: '2021-11-05T14:41:22.000Z'
                    date: 2021/03/01
                    id: '7'
                    updatedAt: '2021-11-05T14:55:30.697Z'
                errors: []
                locationId: '123'
  /v1/logs:
    post:
      tags:
        - Logging Payloads
      summary: Log Payload
      description: >-
        Provides an endpoint to get request/response payloads from external
        systems into ChannelApe during some of the automated flows you are
        using.


        ## Required fields


        The request body is what will be logged and searchable. This can be in
        any format up to 1mb.


        ## Optional headers


        X-Channel-Ape-Logs-Flow - a header to specify which flow this request or
        response body is being logged from. It's recommended to use this to
        organize things but If you don't provide a flow it will be logged under
        a default flow. This must be alphanumeric.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                customer:
                  first_name: John
                  last_name: Doe
      parameters:
        - name: X-Channel-Ape-Logs-Flow
          in: header
          schema:
            type: string
          example: sendorders
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
              example:
                flow: default
                logtime: '2022-09-08T20:50:56.592Z'
                businessId: '{{business_id}}'
        '400':
          content:
            application/json:
              schema:
                type: object
              example:
                errors:
                  - message: Flow must be alphanumeric.
        undefined:
          content:
            text/plain:
              schema:
                type: string
              example: null
  /v1/inventories/17/quantities/adjusts:
    post:
      tags:
        - Inventories > Quantities
      summary: Adjust inventory item quantity
      description: >-
        Adjusts the inventory items current quantity at a given location and
        status. Request will fail if the inventory item does not exist.


        Note that if you set the 'effectiveAt' time to the future, it will be
        staged and added to the adjustments at the effective time. The staged
        adjustments cannot be removed or edited. You'll need to make another
        adjustment to negate it.


        ## Required Request Headers


        **X-Channel-Ape-Idempotent-Key** - A unique value linked to the request
        that prevents the same operation from occuring twice. Limit of 255
        characters.


        ## Required Request Fields


        **locationId** - The location at which the quantity will be adjusted.
        Must be a valid ChannelApe location


        **quantity** - The quantity to the adjust the existing quantity by.


        **inventoryStatus** - The status of the quantity that will be
        adjusted.  

        Possible values include:


        \* AVAILABLE_TO_SELL  

        \* COMMITTED  

        \* ON_ORDER  

        \* RESERVE  

        \* ON_HOLD  

        \* ON_HAND


        ## Optional Request Fields


        **aggregateChannelSync** - true or false. Defaults to false. If
        specified as true, the side affects of making adjustments to parent
        locations will happen. See the side effects section below.


        **memo** - A note to describe why the adjustment was possibly made.
        Limit of 1000 characters.


        **effectiveAt -** The time the adjustment should be effective. If this
        is in the future, this will be staged and inserted into the adjustment
        history log at the effective time. This can be useful for expiring
        adjustments by creating an adjustment that offsets an existing one.


        ChannelApe does allow setting effective dates in the past, but does not
        rewrite the adjustment history. It will be placed in the history log at
        the time the adjustment is made.


        **expiresAt** - The time the adjustment should negate itself. These are
        always relative to the adjustment that is made. So even if you are doing
        a set the future adjustment will be the opposite of that. Example a +7
        adjustment on sku ABC-123 is set to expire the following day. The
        following day a -7 adjustment will be made when the adjustment expires.


        **futureAppliedAtpPercentage-** If you are making adjustments in the
        future for reserving inventory it may be hard to know exactly what
        quantities you want to set and expire in the future, especially in bulk.
        To make this easier, the API has an option to make a future adjustment
        based on the total inventory you have available to promise. If you have
        100 units available to promise currently and you want to reserve 5% of
        those you can use this field in a future adjustment to take 5% of
        whatever inventory you have left at the time and reserve it. So if you
        sell through all 100, there is nothing to reserve. If you don't sell
        through any and still have 100 units, it will reserve 10 leaving you 90
        units to sell.


        For more on inventory adjustments and how they work in ChannelApe see
        our [Inventory Management
        documentation.](https://channelape.zendesk.com/hc/en-us/articles/1500000062901-ChannelApe-Inventory-Management-System)


        ## Side Effects


        If the location you are making an adjustment for is the child of one or
        more parent locations and aggregateChannelSync flag is true, the same
        relative adjustment will be made to each parent location. Ie. +1 on the
        child, then a +1 for each parent. If any of the parents are associated
        with a real time inventory channel, then the current ATP will also be
        synchronized to channel. The aggregateChannelSync only applies to
        currently effective adjustments.


        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 201 | Inventory item quantity has been adjusted successfully |

        | 400 | One or more fields provided in the request body are invalid. |

        | 404 | Inventory Item could not be found. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                locationId: 10
                inventoryStatus: ON_HOLD
                quantity: '15'
                effectiveAt: '2019-10-25T19:07:49.088Z'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: X-Channel-Ape-Idempotent-Key
          in: header
          schema:
            type: string
          example: '{{$guid}}'
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/inventories/quantities/adjusts:
    post:
      tags:
        - Inventories > Quantities
      summary: Adjust inventory item quantity by SKU
      description: "Adjusts the inventory items current quantity at a given location and status. Request will fail if the inventory item does not exist.\n\nNote that if you set the 'effectiveAt' time to the future, it will be staged and added to the adjustments at the effective time. The staged adjustments cannot be removed or edited. You'll need to make another adjustment to negate it.\n\n## Required Request Headers\n\n**X-Channel-Ape-Idempotent-Key** - A unique value linked to the request that prevents the same operation from occuring twice. Limit of 255 characters.\n\n## Required Request Fields\n\n**locationId** - The location at which the quantity will be adjusted. Must be a valid ChannelApe location\n\n**quantity** - The quantity to the adjust the existing quantity by.\n\n**sku** - The sku for item in ChannelApe. If the sku does not exist, it will be automatically created\n\n**inventoryStatus** - The status of the quantity that will be adjusted.  \nPossible values include:\n\n\\* AVAILABLE_TO_SELL  \n\\* COMMITTED  \n\\* ON_ORDER  \n\\* RESERVE  \n\\* ON_HOLD  \n\\* ON_HAND\n\n## Optional Request Fields\n\n**aggregateChannelSync** - true or false. Defaults to false. If specified as true, the side affects of making adjustments to parent locations will happen. See the side effects section below.\n\n**memo** - A note to describe why the adjustment was possibly made. Limit of 1000 characters.\n\n**effectiveAt -** The time the adjustment should be effective. If this is in the future, this will be staged and inserted into the adjustment history log at the effective time. This can be useful for expiring adjustments by creating an adjustment that offsets an existing one.\n\nChannelApe does allow setting effective dates in the past, but does not rewrite the adjustment history. It will be placed in the history log at the time the adjustment is made.\n\n**expiresAt**\_- The time the adjustment should negate itself. These are always relative to the adjustment that is made. So even if you are doing a set the future adjustment will be the opposite of that. Example a +7 adjustment on sku ABC-123 is set to expire the following day. The following day a -7 adjustment will be made when the adjustment expires.\n\n**futureAppliedAtpPercentage-**\_If you are making adjustments in the future for reserving inventory it may be hard to know exactly what quantities you want to set and expire in the future, especially in bulk. To make this easier, the API has an option to make a future adjustment based on the total inventory you have available to promise. If you have 100 units available to promise currently and you want to reserve 5% of those you can use this field in a future adjustment to take 5% of whatever inventory you have left at the time and reserve it. So if you sell through all 100, there is nothing to reserve. If you don't sell through any and still have 100 units, it will reserve 10 leaving you 90 units to sell.\n\nFor more on inventory adjustments and how they work in ChannelApe see our [Inventory Management documentation.](https://channelape.zendesk.com/hc/en-us/articles/1500000062901-ChannelApe-Inventory-Management-System)\n\n## Side Effects\n\nIf the location you are making an adjustment for is the child of one or more parent locations and aggregateChannelSync flag is true, the same relative adjustment will be made to each parent location. Ie. +1 on the child, then a +1 for each parent. If any of the parents are associated with a real time inventory channel, then the current ATP will also be synchronized to channel.\n\n## HTTP Status Codes\n\n| Status | Meaning |\n| --- | --- |\n| 201 | Inventory item quantity has been adjusted successfully |\n| 400 | One or more fields provided in the request body are invalid. |\n| 404 | Inventory Item could not be found. |"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                locationId: 10
                sku: Some-New-Sku
                inventoryStatus: ON_HOLD
                quantity: '15'
                effectiveAt: '2019-10-25T19:07:49.088Z'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: X-Channel-Ape-Idempotent-Key
          in: header
          schema:
            type: string
          example: '{{$guid}}'
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
              example:
                adjustment: 100
                apiAccountId: '123'
                createdAt: '2022-09-13T18:25:34.753Z'
                effectiveAt: '2022-09-13T18:25:34.753Z'
                inventoryItemId: '100'
                inventoryStatus: AVAILABLE_TO_SELL
                locationId: '50'
                quantity: 100
                staged: false
                updatedAt: '2022-09-13T18:25:34.753Z'
  /v1/inventories/17/quantities/sets:
    post:
      tags:
        - Inventories > Quantities
      summary: Set inventory item quantity
      description: >-
        Overwrites the inventory items current quantity at a given location and
        status.


        ## Required Request Headers


        **X-Channel-Ape-Idempotent-Key** - A unique value linked to the request
        that prevents the same operation from occuring twice. Limit of 255
        characters.


        ## Required Request Fields


        **locationId** - The location at which the quantity will be adjusted.
        Must be a valid ChannelApe location


        **quantity** - The quantity to the adjust the existing quantity by.


        **inventoryStatus** - The status of the quantity that will be
        adjusted.  

        Possible values include:


        \* AVAILABLE_TO_SELL  

        \* COMMITTED  

        \* ON_ORDER  

        \* RESERVE  

        \* ON_HOLD  

        \* ON_HAND


        ## Optional Request Fields


        **aggregateChannelSync** - true or false. Defaults to false. If
        specified as true, the side affects of making adjustments to parent
        locations will happen. See the side effects section below.


        **memo** - A note to describe why the adjustment was possibly made.
        Limit of 1000 characters.


        **effectiveAt -** The time the adjustment should be effective. If this
        is in the future, this will be staged and inserted into the adjustment
        history log at the effective time. This can be useful for expiring
        adjustments by creating an adjustment that offsets an existing one.


        ChannelApe does allow setting effective dates in the past, but does not
        rewrite the adjustment history. It will be placed in the history log at
        the time the adjustment is made.


        For more on inventory adjustments and how they work in ChannelApe see
        our [Inventory Management
        documentation.](https://channelape.zendesk.com/hc/en-us/articles/1500000062901-ChannelApe-Inventory-Management-System)


        ## Side Effects


        If the location you are making an adjustment for is the child of one or
        more parent locations and the aggregateChannelSync flag is set to true,
        then for each parent, it will sum up all of the adjusted statuses
        current quantities from all of the parents child locations, including
        the new adjustment that was just made and will set that value as the
        current value for the parent location. If any of the parents are
        associated with a real time inventory channel, then the current ATP will
        also be synchronized to channel.


        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 201 | Inventory item quantity has been adjusted successfully |

        | 400 | One or more fields provided in the request body are invalid. |

        | 404 | Inventory Item could not be found. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                locationId: 10
                inventoryStatus: ON_HOLD
                quantity: '15'
                effectiveAt: '2019-10-25T19:07:49.088Z'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: X-Channel-Ape-Idempotent-Key
          in: header
          schema:
            type: string
          example: '{{$guid}}'
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/inventories/quantities/sets:
    post:
      tags:
        - Inventories > Quantities
      summary: Set inventory item quantity by SKU
      description: >-
        Overwrites the inventory items current quantity at a given location and
        status.


        ## Required Request Headers


        **X-Channel-Ape-Idempotent-Key** - A unique value linked to the request
        that prevents the same operation from occuring twice. Limit of 255
        characters.


        ## Required Request Fields


        **locationId** - The location at which the quantity will be adjusted.
        Must be a valid ChannelApe location


        **quantity** - The quantity to the adjust the existing quantity by.


        **sku** - The sku for item in ChannelApe. If the sku does not exist, it
        will be automatically created


        **inventoryStatus** - The status of the quantity that will be
        adjusted.  

        Possible values include:


        \* AVAILABLE_TO_SELL  

        \* COMMITTED  

        \* ON_ORDER  

        \* RESERVE  

        \* ON_HOLD  

        \* ON_HAND


        ## Optional Request Fields


        **aggregateChannelSync** - true or false. Defaults to false. If
        specified as true, the side affects of making adjustments to parent
        locations will happen. See the side effects section below.


        **memo** - A note to describe why the adjustment was possibly made.
        Limit of 1000 characters.


        **effectiveAt -** The time the adjustment should be effective. If this
        is in the future, this will be staged and inserted into the adjustment
        history log at the effective time. This can be useful for expiring
        adjustments by creating an adjustment that offsets an existing one.


        ChannelApe does allow setting effective dates in the past, but does not
        rewrite the adjustment history. It will be placed in the history log at
        the time the adjustment is made.


        For more on inventory adjustments and how they work in ChannelApe see
        our [Inventory Management
        documentation.](https://channelape.zendesk.com/hc/en-us/articles/1500000062901-ChannelApe-Inventory-Management-System)


        ## Side Effects


        If the location you are making an adjustment for is the child of one or
        more parent locations and the aggregateChannelSync flag is set to true,
        then for each parent, it will sum up all of the adjusted statuses
        current quantities from all of the parents child locations, including
        the new adjustment that was just made and will set that value as the
        current value for the parent location. If any of the parents are
        associated with a real time inventory channel, then the current ATP will
        also be synchronized to channel.


        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 201 | Inventory item quantity has been adjusted successfully |

        | 400 | One or more fields provided in the request body are invalid. |

        | 404 | Inventory Item could not be found. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                locationId: 10
                sku: Some-New-Sku
                inventoryStatus: ON_HOLD
                quantity: '15'
                effectiveAt: '2019-10-25T19:07:49.088Z'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: X-Channel-Ape-Idempotent-Key
          in: header
          schema:
            type: string
          example: '{{$guid}}'
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
              example:
                adjustment: 100
                apiAccountId: '123'
                createdAt: '2022-09-13T18:25:34.753Z'
                effectiveAt: '2022-09-13T18:25:34.753Z'
                inventoryItemId: '100'
                inventoryStatus: AVAILABLE_TO_SELL
                locationId: '50'
                quantity: 100
                staged: false
                updatedAt: '2022-09-13T18:25:34.753Z'
  /v1/inventories/17/quantities:
    get:
      tags:
        - Inventories > Quantities
      summary: Retrieve Inventory Item Quantities
      description: >-
        Retrieves the newest quantities for all the different locations and
        statuses.

        If an adjustment does not exist yet for a given location/status
        combination it will not be returned.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Inventory Item exists. |

        | 404 | Inventory Item could not be found. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/inventories:
    post:
      tags:
        - Inventories
      summary: Create Inventory Item
      description: >-
        ## Required Request Fields


        **sku** - Unique identifier for your inventory item up to 100
        characters. Must be unique for your ChannelApe business.


        **businessId** - The ChannelApe business ID to associate the Inventory
        Item to.


        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 201 | Inventory Item has been created. |

        | 400 | One or more fields provided in the request body are invalid. |

        | 404 | Business could not be found. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                businessId: d119c22a-92a3-49f4-b020-e3e43c23c28d
                sku: 301-0059-LE
                title: The Summer Collection Bundle
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Inventories
      summary: Get Inventory Item by SKU
      description: >
        Retrieves a list of inventory items with the given SKU on the given
        business. 1 or 0 results will be returned.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Inventory Items have been retrieved.  |

        | 400 | One or more fields provided in the request are invalid. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: 7790a7d0-2a53-4521-bde4-59ad32147edd
        - name: sku
          in: query
          schema:
            type: string
          example: 301-0059-LE
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/inventories/123:
    put:
      tags:
        - Inventories
      summary: Update Inventory Item
      description: >-
        Update an Inventory item.


        Required Request Fields

        ---

        __sku__ - Unique identifier for your inventory item. Must be unique for
        your ChannelApe business.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Inventory Item has been updated.  |

        | 400 | One or more fields provided in the request body are invalid. |

        | 404 | Inventory Item could not be found. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                sku: 301-0059-LE
                title: The Summer Collection Bundle
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Inventories
      summary: Get Inventory Item
      description: |-
        Retrieves a single Inventory Item item by ID.

        HTTP Status Codes
        ---
        |Status  | Meaning |
        |--|--|
        | 200 | Inventory Item has been retrieved.  |
        | 404 | Inventory Item could not be found. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/orders:
    post:
      tags:
        - Orders
      summary: Create order
      description: >-
        Create a new order for a channel. 


        Required Fields

        ---

        __channelId__ - ID for ChannelApe channel that order belongs to (i.e.
        Shopify Channel, Amazon Channel, eBay Channel).


        __channelOrderId__ - ID for order unique to ChannelApe business that you
        assign (i.e. Shopify Order ID, ASIN).


        __alphabeticCurrencyCode__ - Currency used throughout all price fields
        of the order (i.e. USD, EUR, CAD).


        __status__ - State of order (PENDING, OPEN, IN_PROGRESS, CLOSED,
        CANCELED, HOLD).


        __lineItems__ - List of line items for the order. At least one is
        required to create order. Only required fields for a lineItem are a "id"
        and "quantity". "id" needs to be unique across all line items for the
        order and "quantity" needs to be greater then 0.


        Optional Headers

        ---

        |Header  | Use |

        |--|--|

        | X-Channel-Ape-Action-Id | Attaches an action to any order activities
        created by the request whenver a valid action ID is provided. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                channelId: '{{channel_id}}'
                channelOrderId: '{{channel_order_id}}'
                status: CANCELED
                alphabeticCurrencyCode: USD
                totalPrice: '30.80'
                subtotalPrice: '30.80'
                totalTax: '1.97'
                totalShippingPrice: '3.00'
                totalShippingTax: '0.18'
                totalGrams: '226.796'
                purchasedAt: '2015-09-11T20:52:15.000Z'
                canceledAt: '2015-09-13T08:04:00.000Z'
                canceledReason: Wrong product
                customer:
                  name: Dan Nino
                  firstName: Dan
                  lastName: Nino
                  email: iomalte14@yopmail.com
                  phone: (570)555-1234
                  shippingAddress:
                    name: Dan Nino
                    firstName: Dan
                    lastName: Nino
                    company: ChannelApe
                    address1: 224 Wyoming Avenue
                    address2: Rear of 1st Floor
                    city: Scranton
                    province: Pennsylvania
                    provinceCode: PA
                    country: United States
                    countryCode: US
                    postalCode: '18503'
                    phone: (555)555-5555
                    additionalFields:
                      - name: shipping_address_id
                        value: '3425252'
                      - name: note
                        value: Leave with dog.
                  billingAddress:
                    name: Dan Nino
                    firstName: Dan
                    lastName: Nino
                    company: ChannelApe
                    address1: 224 Wyoming Avenue
                    address2: Rear of 1st Floor
                    city: Scranton
                    province: Pennsylvania
                    provinceCode: PA
                    country: United States
                    countryCode: US
                    postalCode: '18503'
                    phone: (555)555-5555
                    additionalFields:
                      - name: billing_address_id
                        value: '897987466'
                      - name: note
                        value: Paid with PayPal
                  additionalFields:
                    - name: FirstTimeCustomer
                      value: 'false'
                    - name: InternationalCustomer
                      value: 'false'
                fulfillments:
                  - id: '94938'
                    status: CANCELED
                    shippingCompany: UPS
                    shippingMethod: SecondDay
                    trackingNumber: AF335244
                    shippedAt: '2015-09-11T21:52:15.000Z'
                    lineItems:
                      - id: '52365397597450'
                        sku: 0Z-DAPL-Y6NE
                        upc: '442806190'
                        price: '30.80'
                        shippingPrice: '3.00'
                        shippingTax: '0.18'
                        shippingMethod: 2nd Day Air
                        quantity: 1
                        title: >-
                          Metagenics Multigenics Intensive Care without Iron
                          180T
                        vendor: Metagenics
                        grams: '226.796'
                        additionalFields:
                          - name: ASIN
                            value: B003B6UM5S
                          - name: QuantityShipped
                            value: '1'
                          - name: ItemTaxCurrencyCode
                            value: USD
                          - name: PromotionDiscountCurrencyCode
                            value: USD
                          - name: PromotionDiscountAmount
                            value: '0.00'
                    additionalFields:
                      - name: WarehouseID
                        value: CA-34
                lineItems:
                  - id: '52365397597450'
                    sku: 0Z-DAPL-Y6NE
                    upc: '442806190'
                    price: '30.80'
                    shippingPrice: '3.00'
                    shippingTax: '0.18'
                    shippingMethod: 2nd Day Air
                    quantity: 1
                    title: Metagenics Multigenics Intensive Care without Iron 180T
                    vendor: Metagenics
                    grams: '226.796'
                    additionalFields:
                      - name: ASIN
                        value: B003B6UM5S
                      - name: QuantityShipped
                        value: '1'
                      - name: ItemTaxCurrencyCode
                        value: USD
                      - name: PromotionDiscountCurrencyCode
                        value: USD
                      - name: PromotionDiscountAmount
                        value: '0.00'
                refunds:
                  - channelRefundId: '123456'
                    supplierRefundId: '789123'
                    transactions:
                      - id: channel-transaction-id
                        amount: '9.99'
                        message: 9.99 Paid to seller.
                        status: PENDING
                    adjustments:
                      - id: channel-adjustment-id
                        amount: '-3.99'
                        taxAmount: '1.99'
                        reason: Refund Discrepancy
                    lineItems:
                      - id: '52365397597450'
                        sku: 0Z-DAPL-Y6NE
                        upc: '442806190'
                        price: '30.80'
                        shippingPrice: '3.00'
                        shippingTax: '0.18'
                        shippingMethod: 2nd Day Air
                        quantity: 1
                        title: >-
                          Metagenics Multigenics Intensive Care without Iron
                          180T
                        vendor: Metagenics
                        grams: '226.796'
                        additionalFields:
                          - name: ASIN
                            value: B003B6UM5S
                          - name: QuantityShipped
                            value: '1'
                          - name: ItemTaxCurrencyCode
                            value: USD
                          - name: PromotionDiscountCurrencyCode
                            value: USD
                          - name: PromotionDiscountAmount
                            value: '0.00'
                additionalFields:
                  - name: MarketplaceId
                    value: ATVPDKIKX0DER
                  - name: FulfillmentChannel
                    value: AFN
                  - name: ShipmentServiceLevelCategory
                    value: SecondDay
                  - name: ShipServiceLevel
                    value: SecondDay
                  - name: NumberOfItemsShipped
                    value: '1'
                  - name: NumberOfItemsUnshipped
                    value: '0'
                  - name: EarliestShipDate
                    value: '2015-09-14T07:15:36Z'
                  - name: LatestShipDate
                    value: '2015-09-14T07:15:36Z'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Orders
      summary: Query orders by channel
      description: >-
        Query orders for a given channel.


        Required query parameters

        ---

        __channelId__ - ID of ChannelApe channel


        Optional query parameters

        ---

        __status__ - String of PENDING, OPEN, HOLD, IN_PROGRESS, CLOSED, or
        CANCELED (no default). Used to filter results by one or many statuses.
        Multiple statuses can be provided by duplicate the status key and
        providing a different value.


        __startDate__ - ISO 8601 date string (defaults to epoch time). Used to
        filter results after given purchase date.


        __endDate__ - ISO 8601 date string (defaults to current time). Used to
        filter results before given purchase date.


        __updatedAtStartDate__ - ISO 8601 date string (defaults to epoch time).
        Used to filter orders that were updated after this time. Can be used in
        conjuction with __startDate__ and __endDate__ query params.


        __updatedAtEndDate__ - ISO 8601 date string (defaults to current time).
        Used to filter orders that were updated before this time. Can be used in
        conjuction with __startDate__ and __endDate__ query params.


        __lastKey__ - ID returned on previous page of results. Used to retrieve
        next page of results when results are paginated.


        __size__ - Integer between 1 and 250 (defaults to 100). Maximum number
        of results to return.


        __count__ - Boolean values of true or false (defaults to false). Should
        query return count of all matched results.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: channelId
          in: query
          schema:
            type: string
          example: '{{channel_id}}}'
        - name: status
          in: query
          schema:
            type: string
          example: OPEN
        - name: size
          in: query
          schema:
            type: integer
          example: '100'
        - name: startDate
          in: query
          schema:
            type: string
          example: '2016-02-20T20:21:51.403Z'
        - name: endDate
          in: query
          schema:
            type: string
          example: '2017-02-27T20:00:00.000Z'
        - name: updatedAtStartDate
          in: query
          schema:
            type: string
          example: '2016-02-23T20:21:59.705Z'
        - name: updatedAtEndDate
          in: query
          schema:
            type: string
          example: '2017-02-25T12:15:15.080Z'
        - name: lastKey
          in: query
          schema:
            type: string
          example: '{{last_key}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/orders/21c922c0-69a4-425b-aea3-4ad8e1aaffc4:
    patch:
      tags:
        - Orders
      summary: Patch Order
      description: >-
        Patch a single order using its ID. Any data not included in the request
        will be ignored, and the data will remain untouched unless explicitly
        defined. ChannelApe does not support patching individual list
        items(fulfillments, refunds, line items, or additional fields at any
        level). If a list is passed in on the request it will be wiped and
        recreated again with that given information.


        All line item fields other than SKU and ID can be updated. Quantities
        can only be increased. New line items can also be added to an order.


        Required Fields

        ---

        No fields are required.



        Optional Headers

        ---

        |Header  | Use |

        |--|--|

        | X-Channel-Ape-Action-Id | Attaches an action to any order activities
        created by the request whenver a valid action ID is provided. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                status: CANCELED
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    put:
      tags:
        - Orders
      summary: Update order
      description: >-
        Update a single order using its ID. Any data not included in the request
        will be erased from the currently saved order.


        All line item fields other than SKU and ID can be updated. Quantities
        can only be increased. New line items can also be added to an order.


        Required Fields

        ---

        __channelId__ - ID for ChannelApe channel that order belongs to (i.e.
        Shopify Channel, Amazon Channel, eBay Channel).


        __channelOrderId__ - ID for order unique to ChannelApe business that you
        assign (i.e. Shopify Order ID, ASIN).


        __alphabeticCurrencyCode__ - Currency used throughout all price fields
        of the order (i.e. USD, EUR, CAD).


        __status__ - State of order (PENDING, OPEN, IN_PROGRESS, CLOSED,
        CANCELED, HOLD).


        Optional Headers

        ---

        |Header  | Use |

        |--|--|

        | X-Channel-Ape-Action-Id | Attaches an action to any order activities
        created by the request whenver a valid action ID is provided. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                status: CANCELED
                alphabeticCurrencyCode: USD
                totalPrice: '30.80'
                subtotalPrice: '30.80'
                totalTax: '1.97'
                totalShippingPrice: '3.00'
                totalShippingTax: '0.18'
                totalGrams: '226.796'
                purchasedAt: '2015-09-11T20:52:15.000Z'
                canceledAt: '2015-09-13T08:04:00.000Z'
                canceledReason: Wrong product
                customer:
                  name: Dan Nino
                  firstName: Dan
                  lastName: Nino
                  email: iomalte14@yopmail.com
                  phone: (570)555-1234
                  shippingAddress:
                    name: Dan Nino
                    firstName: Dan
                    lastName: Nino
                    company: ChannelApe
                    address1: 224 Wyoming Avenue
                    address2: Rear of 1st Floor
                    city: Scranton
                    province: Pennsylvania
                    provinceCode: PA
                    country: United States
                    countryCode: US
                    postalCode: '18503'
                    phone: (555)555-5555
                    additionalFields:
                      - name: shipping_address_id
                        value: '3425252'
                      - name: note
                        value: Leave with dog.
                  billingAddress:
                    name: Dan Nino
                    firstName: Dan
                    lastName: Nino
                    company: ChannelApe
                    address1: 224 Wyoming Avenue
                    address2: Rear of 1st Floor
                    city: Scranton
                    province: Pennsylvania
                    provinceCode: PA
                    country: United States
                    countryCode: US
                    postalCode: '18503'
                    phone: (555)555-5555
                    additionalFields:
                      - name: billing_address_id
                        value: '897987466'
                      - name: note
                        value: Paid with PayPal
                  additionalFields:
                    - name: FirstTimeCustomer
                      value: 'false'
                    - name: InternationalCustomer
                      value: 'false'
                fulfillments:
                  - id: '94938'
                    status: CANCELED
                    shippingCompany: UPS
                    shippingMethod: SecondDay
                    trackingNumber: AF335244
                    shippedAt: '2015-09-11T21:52:15.000Z'
                    lineItems:
                      - id: '52365397597450'
                        sku: 0Z-DAPL-Y6NE
                        upc: '442806190'
                        price: '30.80'
                        shippingPrice: '3.00'
                        shippingTax: '0.18'
                        shippingMethod: 2nd Day Air
                        quantity: 1
                        title: >-
                          Metagenics Multigenics Intensive Care without Iron
                          180T
                        vendor: Metagenics
                        grams: '226.796'
                        additionalFields:
                          - name: ASIN
                            value: B003B6UM5S
                          - name: QuantityShipped
                            value: '1'
                          - name: ItemTaxCurrencyCode
                            value: USD
                          - name: PromotionDiscountCurrencyCode
                            value: USD
                          - name: PromotionDiscountAmount
                            value: '0.00'
                    additionalFields:
                      - name: WarehouseID
                        value: CA-34
                refunds:
                  - channelRefundId: '123456'
                    supplierRefundId: '789123'
                    transactions:
                      - id: channel-transaction-id
                        amount: '9.99'
                        message: 9.99 Paid to seller.
                        status: PENDING
                    adjustments:
                      - id: channel-adjustment-id
                        amount: '-3.99'
                        taxAmount: '1.99'
                        reason: Refund Discrepancy
                    lineItems:
                      - id: '52365397597450'
                        sku: 0Z-DAPL-Y6NE
                        upc: '442806190'
                        price: '30.80'
                        shippingPrice: '3.00'
                        shippingTax: '0.18'
                        shippingMethod: 2nd Day Air
                        quantity: 1
                        title: >-
                          Metagenics Multigenics Intensive Care without Iron
                          180T
                        vendor: Metagenics
                        grams: '226.796'
                        additionalFields:
                          - name: ASIN
                            value: B003B6UM5S
                          - name: QuantityShipped
                            value: '1'
                          - name: ItemTaxCurrencyCode
                            value: USD
                          - name: PromotionDiscountCurrencyCode
                            value: USD
                          - name: PromotionDiscountAmount
                            value: '0.00'
                additionalFields:
                  - name: MarketplaceId
                    value: ATVPDKIKX0DER
                  - name: FulfillmentChannel
                    value: AFN
                  - name: ShipmentServiceLevelCategory
                    value: SecondDay
                  - name: ShipServiceLevel
                    value: SecondDay
                  - name: NumberOfItemsShipped
                    value: '1'
                  - name: NumberOfItemsUnshipped
                    value: '0'
                  - name: EarliestShipDate
                    value: '2015-09-14T07:15:36Z'
                  - name: LatestShipDate
                    value: '2015-09-14T07:15:36Z'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/orders/0202cd4e-077c-496d-a218-5171172a9afa:
    delete:
      tags:
        - Orders
      summary: Delete order
      description: >-
        Delete a single order using its ID.


        Optional Headers

        ---

        |Header  | Use |

        |--|--|

        | X-Channel-Ape-Action-Id | Attaches an action to any order activities
        created by the request whenver a valid action ID is provided. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/orders/{order_id}:
    get:
      tags:
        - Orders
      summary: Get order
      description: Retrieve a single order by its order ID.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: order_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/orders/summaries:
    get:
      tags:
        - Orders
      summary: Get order summary
      description: >-
        Retrieves a summary of order inforamtion between two periods. Defaults
        to seven days.


        Required query parameters

        ---

        __businessId__ - ID of ChannelApe business


        Optional query parameters

        ---

        __startDate__ - ISO 8601 date string (defaults to 7 days prior). Used to
        filter results after given purchase date.


        __endDate__ - ISO 8601 date string (defaults to current time). Used to
        filter results before given purchase date.


        Response variables

        ---

        __earliestCreationTime__ - Timestamp of startDate given as query
        parameter or seven days prior if no startDate is given.


        __latestCreationTime__ - Timestamp of endDate given as query parameter
        or current time if no endDate is given.


        __agingOrders__ - Orders with a createdAt date between seven days and
        two months ago and an order status of OPEN or IN_PROGRESS. Note this
        list does not change regardless of what startDat and endDate are set to.


        __alphabeticCurrencyCode__ - Currency that all money values returned are
        in. Should be currency code used by business. This endpoint does not
        convert currencies and instead assumes all orders have the same currency
        as the business.


        __closedOrders__ - Number of orders with CLOSED status found for this
        business between the provided start and end dates.


        __openOrders__ - Number of orders with OPEN status found for this
        business between the provided start and end dates.


        __inProgressOrders__ - Number of orders with IN_PROGRESS status found
        for this business between the provided start and end dates.


        __canceledOrders__ - Number of orders with CANCELED status found for
        this business between the provided start and end dates.


        __totalOrders__ - Number of orders found for this business between the
        provided start and end dates.


        __totalRevenue__ - Summation of totalPrice for all orders found between
        the provided start and end dates with an OPEN, IN_PROGRESS, or CLOSED
        status.


        __channels__ - Total order and revenue information for all channels
        (enabled or not) for the business sorted in descending order by total
        revenue. totalRevenue for each channel is calculated by summing the
        totalPrice for each order that has an IN_PROGRESS, CLOSED, or OPEN
        status. Channel without any orders are excluded.


        __topSellingLineItems__ - Top 100 selling line items sorted in
        descending order by totalRevenue. totalRevenue for each line item is
        calcualted by multipling line item price by quantity. Line items with
        the same line item ID are summed together to get the totalRevenue for
        each line item.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: '{{business_id}}'
        - name: startDate
          in: query
          schema:
            type: string
          example: '2017-02-26T18:51:24.275Z'
        - name: endDate
          in: query
          schema:
            type: string
          example: '2017-05-03T18:51:24.275Z'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/orders/activities:
    post:
      tags:
        - Order Activities
      summary: Create an Order Activity
      description: >-
        Log a new order activity for an Order.


        The order must exist in ChannelApe when creating activity unless you are
        specifying a CREATE / ERROR or DELETE / SUCCESS. Although you can still
        create these if the order does exist, ChannelApe can anticipate the
        order not being there for those operation / result combinations.


        ## Required Fields


        **operation** - The operation for the corresponding order. (UPDATE,
        CREATE, or DELETE)


        **result** - The result for the corresponding order. (WARNING, SUCCESS,
        ERROR, UNCHANGED)


        **channelOrderId** - The Channel Order ID for the corresponding order.
        It is only required when you are not providing the Channel Ape Order ID.
        Channel ID is also required if you are providing this field. The should
        be used when an order does not yet exist in ChannelApe.


        **channelId** - The Channel ID for the corresponding order. Must be a
        valid channel on the business, and is only required if providing order
        activity with a Channel Order ID.


        **orderId** - The Channel Ape Order ID of the corresponding order.
        Channel ID and Channel Order ID is not required when providing this
        field.


        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 202 | Order activity has been queued for creation. |

        | 400 | One or more fields provided in the request body are invalid. |

        | 404 | One or more resources provided in the request body could not be
        found. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                operation: CREATE
                result: WARNING
                channelOrderId: '93712370'
                completionTime: '2019-02-21T12:12:00.000Z'
                channelId: c73bb5ca-23d6-4744-96d5-c4fc1ca3bc5c
                actionId: Some-action-id
                messages:
                  - title: Invalid shipping method
                    description: >-
                      No shipping method was provided on the order. Using
                      default shipping method of Standard.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/channels/a0b92153-650e-458a-9253-edeb945c5d31/productblocks/dacbeace-dafc-4609-88f1-7a836bb75fda:
    get:
      tags:
        - Product Blocks
      summary: Get product block
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/channels/a0b92153-650e-458a-9253-edeb945c5d31/productblocks:
    get:
      tags:
        - Product Blocks
      summary: Query product blocks by channel ID
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/channels/a0b92153-650e-458a-9253-edeb945c5d31/productblocks/a3f76404-6f5f-4240-8cb0-8042becf56be:
    delete:
      tags:
        - Product Blocks
      summary: Delete product block
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    put:
      tags:
        - Product Blocks
      summary: Put product block
      requestBody:
        content: {}
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/channels/productblocks:
    get:
      tags:
        - Product Blocks
      summary: Query product blocks by business ID and product filter ID
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: 9f5c18b9-fef3-4d75-9dab-ea9a15fb3940
        - name: productFilterId
          in: query
          schema:
            type: string
          example: 8cc21616-e22f-46d1-913e-00aeecb8d0f2
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/filters/90887395-9ace-45e5-8e0a-f97920cde82f:
    put:
      tags:
        - Product Filters
      summary: Update product filter
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                complement: false
                createdAt: '2015-10-22T17:23:38.106Z'
                errors: []
                id: 90887395-9ace-45e5-8e0a-f97920cde82f
                label: Product Filter with sets of SKUs, UPCs, and Vendors - UPDATE
                skus:
                  - '190856'
                tags:
                  - EuropaSports
                upcs:
                  - '027434004190'
                updatedAt: '2015-10-22T17:24:28.074Z'
                vendors:
                  - TwinLab
                  - Clif
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Product Filters
      summary: Get  product filter
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/filters/8cc21616-e22f-46d1-913e-00aeecb8d0f2:
    delete:
      tags:
        - Product Filters
      summary: Delete product filter
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/filters:
    post:
      tags:
        - Product Filters
      summary: Create product filter
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                businessId: 0ea98dc8-367c-4288-888a-7872e105dc52
                label: Testing Empty Tag Set Error
                condition: NEW
                skus:
                  - '190856'
                tags: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Product Filters
      summary: Query  product filters by business ID and label
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: 9f5c18b9-fef3-4d75-9dab-ea9a15fb3940
        - name: label
          in: query
          schema:
            type: boolean
          example: 'true'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/modifiers:
    post:
      tags:
        - Product Modifiers
      summary: Create product modifier
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                businessId: 41ad9601-a0b1-46a7-a1db-068b36104b6f
                name: Set Equal to Five
                description: Setting quantity to five
                modifier: setEqualTo
                target: quantity
                value: '4.8'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Product Modifiers
      summary: Get product modifiers for business
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: 9f5c18b9-fef3-4d75-9dab-ea9a15fb3940
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/modifiers/576b5814-07e3-4e60-9f41-9cd7b9ea3266:
    delete:
      tags:
        - Product Modifiers
      summary: Delete  product modifier
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/modifiers/d3232e23-fb76-4316-a5ee-0175e71289b0:
    put:
      tags:
        - Product Modifiers
      summary: Update  product modifier
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                name: Add Five Dollars to Price
                description: Add five dollars to retail price
                modifier: addAmount
                target: retailPrice
                value: '5.00'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Product Modifiers
      summary: Get  product modifier
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/channels/a0b92153-650e-458a-9253-edeb945c5d31/productpushes:
    get:
      tags:
        - Product Pushes
      summary: Query product pushes by channel ID
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    put:
      tags:
        - Product Pushes
      summary: Put product push without ordinal
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                productFilterIds:
                  - 02178907-f8ce-4fd1-91b0-8c7d5e21b7bc
                  - b0d2f967-98ff-4813-b01b-e11db46bc659
                  - 4f517811-37e8-4127-b899-255482a27a9b
                productModifierIds:
                  - d3232e23-fb76-4316-a5ee-0175e71289b0
                  - b59fc8e5-9dbc-49cc-8367-665551493997
                primaryCategoryModifier:
                  name: Wall Fixtures
                  value: '116880'
                secondaryCategoryModifier:
                  name: Lamps, Lighting & Ceiling Fans
                  value: '20697'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/channels/a0b92153-650e-458a-9253-edeb945c5d31/productpushes/5:
    delete:
      tags:
        - Product Pushes
      summary: Delete product push
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    put:
      tags:
        - Product Pushes
      summary: Put product push
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                productFilterIds:
                  - 02178907-f8ce-4fd1-91b0-8c7d5e21b7bc
                  - b0d2f967-98ff-4813-b01b-e11db46bc659
                  - 4f517811-37e8-4127-b899-255482a27a9b
                productModifierIds:
                  - d3232e23-fb76-4316-a5ee-0175e71289b0
                  - b59fc8e5-9dbc-49cc-8367-665551493997
                primaryCategoryModifier:
                  name: Wall Fixtures
                  value: '116880'
                secondaryCategoryModifier:
                  name: Lamps, Lighting & Ceiling Fans
                  value: '20697'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/channels/a0b92153-650e-458a-9253-edeb945c5d31/productpushes/1:
    get:
      tags:
        - Product Pushes
      summary: Get product push
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/ba2ca4a0-320a-49a5-bba3-4745cf1a4985:
    put:
      tags:
        - Products
      summary: Update Product
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                categories:
                  secondary: so secondary
                  primary: such primary
                businessId: bff40446-6061-4496-b56a-617fba995d8f
                description: Wow what a test - of presentation layer
                images:
                  - someOtherUrl
                  - someUrl
                optionKeys:
                  - More
                  - Color
                  - Cowbell
                  - Density
                  - Width
                tags:
                  - Test
                  - Hodor
                title: Testing new product fields
                vendor: Hodor
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Products
      summary: Get Product
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/:
    post:
      tags:
        - Products
      summary: Create product
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                categories:
                  secondary: so secondary
                  primary: such primary
                businessId: bff40446-6061-4496-b56a-617fba995d8f
                description: Wow what a test - of presentation layer
                images:
                  - someOtherUrl
                  - someUrl
                optionKeys:
                  - More
                  - Color
                  - Cowbell
                  - Density
                  - Width
                tags:
                  - Test
                  - Hodor
                title: Testing new product fields
                vendor: Hodor
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/recipes/6c62785b-a8b1-453d-aa87-1f23b6821dd4:
    get:
      tags:
        - Recipes
      summary: Get recipe
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    put:
      tags:
        - Recipes
      summary: Update recipe
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                enabled: false
                sourceId: dd9fc4f7-1d33-467c-8ecb-42b59b488736
                sourceType: schedule
                targetAction: PRODUCT_PULL
                targetId: 14384039-7364-44f9-ab00-cd74287ab72a
                targetType: supplier
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/recipes:
    post:
      tags:
        - Recipes
      summary: Create recipe
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                businessId: 6b30c39f-2c7f-422c-8dbb-39072117e94c
                sourceId: 95c48ab3-41df-4a41-af87-3242e2c15c3b
                sourceType: schedule
                targetId: ec67fc63-77f0-4b64-8378-3e7211901f49
                targetType: supplier
                targetAction: PRODUCT_PULL
                enabled: 'true'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Recipes
      summary: Query recipes by business ID
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: dbe7abb7-7d2d-4611-a294-c8ddd094a744
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/recipes/ee507b56-8b59-4852-860e-579fda07f811:
    delete:
      tags:
        - Recipes
      summary: Delete recipe
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/schedules/adac31c7-d17f-4537-9a86-118360bfaad6:
    get:
      tags:
        - Schedules
      summary: Get schedule
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/schedules:
    post:
      tags:
        - Schedules
      summary: Create schedule
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                businessId: dbe7abb7-7d2d-4611-a294-c8ddd094a744
                daysOfWeek:
                  - WEDNESDAY
                  - MONDAY
                  - FRIDAY
                endTimeInMinutes: 1440
                intervalInMinutes: 1337
                startTimeInMinutes: 544
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Schedules
      summary: Query schedules by business ID
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: dbe7abb7-7d2d-4611-a294-c8ddd094a744
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/steps:
    post:
      tags:
        - Steps
      summary: Create step
      description: >-
        Generate a new Playbook Step.


        ## Required Fields


        **name** - Name of the step. Must be unique.


        ## Optional Fields


        **public** - Whether or not the step will be queryable from ChannelApe.
        Default is true. If you turn off public visibility you will only be able
        retrieve this step by ID.


        **environmentVariableKeys -**


        *   name: The name of the environment variable

        *   secured: This flag controls if a value is returned on the retrieval
        of a step/play supplier. This should be used for credentials or other
        sensitive settings that only need to be writable.

        *   defaultValue: If no value is provided when creating a step supplier,
        this value will be used. Note that this will not apply to play suppliers

        *   description: A description for end users to know the intention of
        the environment variable key. Can be up to 1k characters.
            

        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 201 | Step has been created. |

        | 400 | One or more fields provided in the request body are invalid. |

        | 403 | You aren not a Playbook Admin and therefore cannot create steps.
        |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                name: Send ChannelApe 940 over AS2
                public: true
                environmentVariableKeys:
                  - name: CHANNEL_APE_SECRET_KEY
                    description: The API token used to access ChannelApe's APIResources
                    secured: true
                  - defaultValue: CA_AS2
                    name: Port
                    secured: false
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Steps
      summary: Query steps
      description: >-
        Query public steps. Private steps can only be retrieved by retrieving it
        directly by ID.


        Optional query parameters

        ---


        __name__ - String value used to match the beginning of a step name
        (ignoring case).


        __lastKey__ - ID returned on previous page of results. Used to retrieve
        next page of results when results are paginated.


        __size__ - Integer between 1 and 250 (defaults to 100). Maximum number
        of results to return.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Matching steps were returned.  |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: name
          in: query
          schema:
            type: string
          example: send
        - name: size
          in: query
          schema:
            type: integer
          example: '50'
        - name: Authorization
          in: query
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/steps/4a540e2c-01a4-4331-94fc-2d427a954648:
    get:
      tags:
        - Steps
      summary: Get step
      description: |-
        Retrieve a Playbook Step by ID.

        HTTP Status Codes
        ---
        |Status  | Meaning |
        |--|--|
        | 200 | Step was returned.  |
        | 404 | Step could not be found. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/steps/5e6496b3-5d58-41f2-b9fe-1b246478258d:
    put:
      tags:
        - Steps
      summary: Update step
      description: >-
        Update name, public flag, and envrionment variable keys of an existing
        Playbook Step.


        ## Required Fields


        **name** - Name of the step. Must be unique.


        ## Optional Fields


        **public** - Whether or not the step will be queryable from ChannelApe.
        Default is true. If you turn off public visibility you will only be able
        retrieve this step by ID.


        **environmentVariableKeys -**


        *   name: The name of the environment variable

        *   secured: This flag controls if a value is returned on the retrieval
        of a step/play supplier. This should be used for credentials or other
        sensitive settings that only need to be writable.

        *   defaultValue: If no value is provided when creating a step supplier,
        this value will be used. Note that this will not apply to play suppliers

        *   description: A description for end users to know the intention of
        the environment variable key. Can be up to 1k characters.
            

        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 200 | Step has been updated. |

        | 400 | One or more fields provided in the request body are invalid. |

        | 403 | You aren not a Playbook Admin and therefore cannot create steps.
        |

        | 404 | Step could not be found. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                environmentVariableKeys:
                  - name: CHANNEL_APE_SECRET_KEY
                    description: The API token used to access ChannelApe's APIResources
                    secured: true
                  - defaultValue: CA_AS2
                    name: Port
                    secured: false
                name: Send ChannelApe XML over AS2
                public: false
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v2/plays:
    post:
      tags:
        - Plays
      summary: Create play
      description: >-
        Generate a new Playbook Play.


        ## Required Fields


        **name** - Name of the step that must be 190 characters or less.


        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 201 | Play has been created. |

        | 400 | One or more fields provided in the request body are invalid. |

        | 403 | You are not a Playbook Admin and therefore cannot create plays.
        |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                name: Send orders to warehouse
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                createdAt: '2021-04-21T19:05:26.000Z'
                id: 6f0baa19-be1a-4a52-9e21-9b78bc516dd1
                name: Send Orders to Warehouse
                updatedAt: '2021-04-21T19:05:26.000Z'
                scheduleConfigurations: []
    get:
      tags:
        - Plays
      summary: Get All Plays
      description: >-
        Retrieve all Playbook Plays available to install. The plays steps are
        not printed in this API call. You can call /v2/plays/:id to get more
        information on a play.


        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 200 | Plays returned |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                plays:
                  - id: 00fb2d8e-db5a-484d-9722-d72845c81ce4
                    name: Send Orders to Warehouse
                    createdAt: '2021-04-15T16:56:43.000Z'
                    updatedAt: '2021-04-15T16:56:43.000Z'
                    scheduleConfigurations:
                      - createdAt: '2022-01-11T19:36:57.000Z'
                        updatedAt: '2022-01-11T19:36:57.000Z'
                        targetAction: INVOKE_PLAY
                        startTimeInMinutes: 544
                        endTimeInMinutes: 1400
                        intervalTimeInMinutes: 1337
                        daysOfWeek:
                          - MONDAY
                          - TUESDAY
                          - THURSDAY
                      - createdAt: '2022-01-11T19:36:57.000Z'
                        updatedAt: '2022-01-11T19:36:57.000Z'
                        targetAction: INVOKE_PLAY
                        startTimeInMinutes: 544
                        endTimeInMinutes: 1400
                        intervalTimeInMinutes: 1337
                        daysOfWeek:
                          - MONDAY
                          - TUESDAY
                          - WEDNESDAY
                  - id: 034e5806-99a1-43e9-982c-f38f80429c1b
                    name: Receive Fulfillments from Warheouse
                    createdAt: '2021-04-16T12:47:41.000Z'
                    updatedAt: '2021-04-16T12:47:41.000Z'
                    scheduleConfigurations:
                      - createdAt: '2022-01-11T19:36:57.000Z'
                        updatedAt: '2022-01-11T19:36:57.000Z'
                        targetAction: INVOKE_PLAY
                        startTimeInMinutes: 544
                        endTimeInMinutes: 1400
                        intervalTimeInMinutes: 1337
                        daysOfWeek:
                          - MONDAY
                          - TUESDAY
                          - THURSDAY
                      - createdAt: '2022-01-11T19:36:57.000Z'
                        updatedAt: '2022-01-11T19:36:57.000Z'
                        targetAction: INVOKE_PLAY
                        startTimeInMinutes: 544
                        endTimeInMinutes: 1400
                        intervalTimeInMinutes: 1337
                        daysOfWeek:
                          - MONDAY
                          - TUESDAY
                          - WEDNESDAY
  /v2/plays/6f0baa19-be1a-4a52-9e21-9b78bc516dd1:
    get:
      tags:
        - Plays
      summary: Get Play
      description: >-
        Retrieve a Playbook Play by ID. Will return all steps within a play in
        the order that they appear.


        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 200 | Play was returned. |

        | 404 | Play could not be found. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              examples:
                example-0:
                  summary: Get play
                  value:
                    createdAt: '2021-04-21T19:05:26.000Z'
                    id: 6f0baa19-be1a-4a52-9e21-9b78bc516dd1
                    name: Send Orders to Warehouse
                    updatedAt: '2021-04-21T19:05:26.000Z'
                    scheduleConfigurations:
                      - createdAt: '2022-01-11T19:36:57.000Z'
                        updatedAt: '2022-01-11T19:36:57.000Z'
                        targetAction: INVOKE_PLAY
                        startTimeInMinutes: 544
                        endTimeInMinutes: 1400
                        intervalTimeInMinutes: 1337
                        daysOfWeek:
                          - MONDAY
                          - TUESDAY
                          - THURSDAY
                      - createdAt: '2022-01-11T19:36:57.000Z'
                        updatedAt: '2022-01-11T19:36:57.000Z'
                        targetAction: INVOKE_PLAY
                        startTimeInMinutes: 544
                        endTimeInMinutes: 1400
                        intervalTimeInMinutes: 1337
                        daysOfWeek:
                          - MONDAY
                          - TUESDAY
                          - WEDNESDAY
                example-1:
                  summary: Get play with Steps
                  value:
                    createdAt: '2021-04-21T19:05:26.000Z'
                    id: 6f0baa19-be1a-4a52-9e21-9b78bc516dd1
                    name: Send Orders to Warehouse
                    updatedAt: '2021-04-21T19:05:26.000Z'
                    scheduleConfigurations:
                      - createdAt: '2022-01-11T19:36:57.000Z'
                        updatedAt: '2022-01-11T19:36:57.000Z'
                        targetAction: INVOKE_PLAY
                        startTimeInMinutes: 544
                        endTimeInMinutes: 1400
                        intervalTimeInMinutes: 1337
                        daysOfWeek:
                          - MONDAY
                          - TUESDAY
                          - THURSDAY
                      - createdAt: '2022-01-11T19:36:57.000Z'
                        updatedAt: '2022-01-11T19:36:57.000Z'
                        targetAction: INVOKE_PLAY
                        startTimeInMinutes: 544
                        endTimeInMinutes: 1400
                        intervalTimeInMinutes: 1337
                        daysOfWeek:
                          - MONDAY
                          - TUESDAY
                          - WEDNESDAY
                    steps:
                      - createdAt: '2021-12-09T19:02:38.352Z'
                        environmentVariableKeys:
                          - name: CUSTOMER_SERVICE_MATURITY_PERIOD
                            secured: false
                          - name: VIRTUAL_SALES_CHANNEL_LOCATION_ID
                            secured: false
                          - name: CUSTOMER_SERVICE_TIMEZONE
                            secured: false
                          - name: CUSTOMER_SERVICE_WINDOW_BYPASS_TAGS
                            secured: false
                        id: 6d0a2ee5-e72f-4836-9735-7024d84783d3
                        name: Customer Service Window
                        public: true
                        updatedAt: '2022-04-29T13:46:59.768Z'
                      - createdAt: '2021-06-14T23:50:01.690Z'
                        environmentVariableKeys:
                          - description: >-
                              The Secret key generated for the API User assigned
                              to this Play and used to interact with our APIs.
                            name: CHANNEL_APE_SECRET_KEY
                            secured: true
                          - defaultValue: '5'
                            description: >-
                              The number of simultaneous HTTP connections that
                              can be opened during the Play's run.

                              Generally speaking this should be left at 5, which
                              is default.

                              In certain circumstances this should be increased
                              to improve runtimes for API-heavy Plays, like
                              Inventory Sync.

                              If you need to use an increased limit, please open
                              a support ticket explaning why.
                            name: MAXIMUM_CONCURRENT_CONNECTIONS
                            secured: false
                          - description: >-
                              The numeric Shopify order ID (can be retrieved
                              from the URL of an order in Shopify Admin) is used
                              to exclude any order with an ID less than the
                              value defined here.
                            name: SHOPIFY_ORDER_ID_CUTOFF
                            secured: false
                          - description: >-
                              Comma-separated values list of tags; when an order
                              tag includes any of these it is excluded from
                              fulfillment.

                              e.g. hold,fraud
                            name: SHOPIFY_TAG_FILTERS
                            secured: false
                          - description: >-
                              Comma-separated values list of financial statuses;
                              when an order financial status matches any of
                              these it is excluded from fulfillment

                              .e.g. refunded,voided,pending
                            name: SHOPIFY_FINANCIAL_STATUS_FILTERS
                            secured: false
                          - name: VIRTUAL_SALES_CHANNEL_LOCATION_ID
                            secured: false
                          - name: WAREHOUSE_CODE
                            secured: false
                          - name: WAREHOUSE_LOCATION_ID
                            secured: false
                          - description: >-
                              This ISO 3166 alpha 2 country code is compared to
                              the country code on the order's shipping address
                              to determine if it's shipping Domestically vs
                              Internationally.
                            name: DOMESTIC_COUNTRY_CODE
                            secured: false
                          - description: >-
                              A default carrier code that should be used when no
                              other Shipping Rules apply for domestic shipments.
                            name: DOMESTIC_DEFAULT_CARRIER
                            secured: false
                          - description: >-
                              A default service code that should be used when no
                              other Shipping Rules apply for domestic shipments.
                            name: DOMESTIC_DEFAULT_SERVICE
                            secured: false
                          - description: >-
                              A default carrier code that should be used when no
                              other Shipping Rules apply for international
                              shipments.
                            name: INTERNATIONAL_DEFAULT_CARRIER
                            secured: false
                          - description: >-
                              A default service code that should be used when no
                              other Shipping Rules apply for international
                              shipments.
                            name: INTERNATIONAL_DEFAULT_SERVICE
                            secured: false
                          - description: >-
                              CSV formatted text, including newlines, where each
                              row represents a new rule used to select the
                              shipment's carrier and service.
                            name: SHIPPING_RULES
                            secured: false
                          - description: >-
                              A JSON dictionary mapping warehouse codes and
                              their location limits to a ChannelApe Location ID.
                            name: WAREHOUSE_LOCATION_MAP
                            secured: false
                          - description: >-
                              CSV formatted text, including newlines, where each
                              row represents a new rule used to select the
                              warehouse locations available to fulfill the
                              ordered items.
                            name: DOM_PRIORITIES
                            secured: false
                          - description: >-
                              CSV formatted text, including newlines, where each
                              row represents a new bundle configuration.

                              The first column is designated for the bundle SKU
                              and each column after can be dynamically used for
                              that bundle's component SKUs.

                              Multiple units of the same component SKU should be
                              entered as multiple columns.

                              E.g. A bundle, SKU "BNDL", with 2 units of SKU
                              "A", and 1 of SKU "B" should be entered as

                              BNDL,A,A,B
                            name: BUNDLE_CONFIG
                            secured: false
                          - defaultValue: 'false'
                            description: >-
                              This flag, when enabled, prevents the shipment of
                              items that cannot be fulfilled completely at one
                              warehouse location.
                            name: SHIP_COMPLETE
                            secured: false
                        id: 3803b9ff-e3f3-4762-9642-9bdf1f6504a0
                        name: Order Management
                        public: true
                        updatedAt: '2022-04-29T13:46:54.080Z'
                      - createdAt: '2021-08-09T05:49:01.062Z'
                        environmentVariableKeys:
                          - description: >-
                              Acceptabled values are 'Capacity' or 'Fraser'.

                              Deprecated.  Will be replaced when Capacity and
                              Fraser are given their own distinct Plays.
                            name: WAREHOUSE_FORMAT
                            secured: false
                          - description: >-
                              The ChannelApe Location ID configured for the IMS
                              Location that represents the physical warehouse
                              location.

                              Used to automatically set inventory levels for the
                              warehouse location which is needed to support
                              Order Management functions like Backorders and
                              DOM.
                            name: WAREHOUSE_LOCATION_ID
                            secured: false
                          - description: >-
                              The Warehouse code is a unique code assigned to
                              the location for a specific warehouse partner to
                              represent both the location & warehouse partner.

                              Accepted Values:

                              Use 'KYSPL' or 'CAMRL' for corresponding UPS
                              warehouses

                              Use 'CAPACITY_NJ' or 'CAPACITY_CA' for
                              corresponding Capacity warehouses

                              Use 'DAL', 'LAP', 'DVN', 'DV2', 'DV3', 'CHI',
                              'HAZ', 'JAX' for corresponding Quiet warehouses

                              Use 'FRA' for Fraser

                              Use '7550-Hopcott' for SCI
                            name: WAREHOUSE_CODE
                            secured: false
                          - description: >-
                              A JSON dictionary mapping warehouse codes and
                              their location limits to a ChannelApe Location ID.
                            name: WAREHOUSE_LOCATION_MAP
                            secured: false
                          - description: >-
                              For Capacity customers, this is the 2-character
                              client ID given to them for the corresponding
                              warehouse location.
                            name: CLIENT_ID
                            secured: false
                          - description: >-
                              A custom prefix that is prepended to the CSV
                              filename.

                              Warehouse partners typically define this prefix.
                            name: FILENAME_PREFIX
                            secured: false
                          - description: >-
                              The API secret key used authenticate with the MFT
                              system.

                              MFT is used primarily for AS2/EDI integrations.

                              Leave blank if you don't know what this is.
                            name: MFT_SECRET
                            secured: true
                          - description: |-
                              The API endpoint of the designated MFT system.
                              MFT is used primarily for AS2/EDI integrations.
                              Leave blank if you don't know what this is.
                            name: MFT_ENDPOINT
                            secured: false
                          - name: MFT_CONNECTOR_ID
                            secured: false
                          - description: >-
                              This is the Port name where Orders will be
                              uploaded into its Send directory.

                              MFT is used primarily for AS2/EDI integrations.

                              Leave blank if you don't know what this is.
                            name: MFT_PORT_ID
                            secured: false
                          - description: >-
                              The API user used to authenticate with the MFT
                              system.

                              MFT is used primarily for AS2/EDI integrations.

                              Leave blank if you don't know what this is.
                            name: MFT_USER
                            secured: false
                          - defaultValue: 'false'
                            description: >-
                              Boolean flag, when true, uses the legacy MFT APIs
                              (MFT systems provisioned before 2020).

                              MFT is used primarily for AS2/EDI integrations.

                              Leave blank if you don't know what this is.
                            name: MFT_LEGACY
                            secured: false
                          - description: >-
                              This is the Hostname or IP Address of the FTP
                              server we will connect to upload the Orders CSV.
                            name: FTP_HOST
                            secured: false
                          - description: >-
                              This is the port number (typically 21) of the FTP
                              server we will connect to upload the Orders CSV.
                            name: FTP_PORT
                            secured: false
                          - description: >-
                              This is the directory on the FTP server where we
                              will upload the Orders CSVs.
                            name: FTP_PATH
                            secured: false
                          - description: >-
                              This is the username used to authenticate with the
                              FTP server.
                            name: FTP_USERNAME
                            secured: false
                          - description: >-
                              This is the password used to authenticate with the
                              FTP server.
                            name: FTP_PASSWORD
                            secured: true
                          - description: |-
                              Boolean value indicating the FTP uses SSL (FTPS).
                              Note: This is not SFTP which is FTP over SSH.
                            name: FTP_SECURE
                            secured: false
                          - description: >-
                              A JSON dictionary mapping warehouse codes and
                              unique values used to override the values of
                              environment variables when a Shipment document is
                              processed within a defined warehouse's scope.
                            name: NAMESPACES
                            secured: false
                        id: 78417f87-82ff-4e82-a0eb-674b52305bc1
                        name: CSV - Send Order
                        public: true
                        updatedAt: '2022-04-29T13:46:55.431Z'
                      - createdAt: '2021-06-15T01:01:20.890Z'
                        environmentVariableKeys:
                          - description: >-
                              The Secret key generated for the API User assigned
                              to this Play and used to interact with our APIs.
                            name: CHANNEL_APE_SECRET_KEY
                            secured: true
                          - defaultValue: '5'
                            description: >-
                              The number of simultaneous HTTP connections that
                              can be opened during the Play's run.

                              Generally speaking this should be left at 5, which
                              is default.

                              In certain circumstances this should be increased
                              to improve runtimes for API-heavy Plays, like
                              Inventory Sync.

                              If you need to use an increased limit, please open
                              a support ticket explaning why.
                            name: MAXIMUM_CONCURRENT_CONNECTIONS
                            secured: false
                          - description: >-
                              The ChannelApe Location ID configured for the IMS
                              Location on the eCommerce Sales Channel (e.g.
                              Shopify).

                              Used to propagate Inventory updates to inventory
                              on the eCommerce Sales Channel.
                            name: VIRTUAL_SALES_CHANNEL_LOCATION_ID
                            secured: false
                          - description: >-
                              The ChannelApe Location ID configured for the IMS
                              Location that represents the physical warehouse
                              location.

                              Used to apply inventory changes to the warehouse
                              location.
                            name: WAREHOUSE_LOCATION_ID
                            secured: false
                        id: 6c2f027d-c976-4835-b74f-91d789dcbefb
                        name: Update ChannelApe
                        public: true
                        updatedAt: '2022-04-29T13:46:53.997Z'
    put:
      tags:
        - Plays
      summary: Update play
      description: >-
        Update information of an existing Playbook Play. This can only be done
        by Playbook Admins. The steps of a play are not editable from this API
        call. Please contact channelape if you need to change the composition of
        a play.


        ## Required Fields


        **name** - Name of the step that must be 190 characters or less.


        ## Optional Fields


        **scheduleConfigurations** - The optimal schedule/recipe configuration
        for the play. This does not affect functionality but is only used for
        channelape, to automatically create the recipes when you install the
        supplier. Default is empty.


        ## HTTP Status Codes


        | Status | Meaning |

        | --- | --- |

        | 200 | Play has been updated. |

        | 400 | One or more fields provided in the request body are invalid. |

        | 403 | You are not a Playbook Admin and therefore cannot modify plays.
        |

        | 404 | Play could not be found. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                name: Send to orders to new warehouse
                scheduleConfigurations:
                  - targetAction: INVOKE_PLAY
                    startTimeInMinutes: 544
                    endTimeInMinutes: 1400
                    intervalTimeInMinutes: 1337
                    daysOfWeek:
                      - MONDAY
                      - TUESDAY
                      - THURSDAY
                  - targetAction: PUSH_ORDERS
                    startTimeInMinutes: 544
                    endTimeInMinutes: 1400
                    intervalTimeInMinutes: 1337
                    daysOfWeek:
                      - MONDAY
                      - TUESDAY
                      - WEDNESDAY
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                id: 6f0baa19-be1a-4a52-9e21-9b78bc516dd1
                name: Send to orders to new warehouse
                createdAt: '2021-04-16T12:47:41.000Z'
                updatedAt: '2022-01-11T19:16:34.000Z'
                scheduleConfigurations:
                  - createdAt: '2022-01-11T19:36:57.000Z'
                    updatedAt: '2022-01-11T19:36:57.000Z'
                    targetAction: INVOKE_PLAY
                    startTimeInMinutes: 544
                    endTimeInMinutes: 1400
                    intervalTimeInMinutes: 1337
                    daysOfWeek:
                      - MONDAY
                      - TUESDAY
                      - THURSDAY
                  - createdAt: '2022-01-11T19:36:57.000Z'
                    updatedAt: '2022-01-11T19:36:57.000Z'
                    targetAction: INVOKE_PLAY
                    startTimeInMinutes: 544
                    endTimeInMinutes: 1400
                    intervalTimeInMinutes: 1337
                    daysOfWeek:
                      - MONDAY
                      - TUESDAY
                      - WEDNESDAY
                steps: []
  /v1/businesses/{business_id}/searchfields:
    post:
      tags:
        - Search Fields
      summary: Create Search Field
      description: >-
        Create a search field for a business, that are used for searching. Label
        and prefix must be unique to a business.


        Required Fields

        ---

        __label__ - Label that will render next to the input box on the search
        page.


        __prefix__ - The prefix of tags to search for.


        Optional Fields

        ---

        __ordinal__ - Controls the rendering order of search fields on the
        search page.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                label: Color
                prefix: color_
                ordinal: 3
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: business_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Search Fields
      summary: Get Businesses Search Fields
      description: Retrieves all search fields for a given business.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: business_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/businesses/{business_id}/searchfields/2:
    get:
      tags:
        - Search Fields
      summary: Get Search Field
      description: Retrieves label, prefix, and ordinal of a given search field.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: business_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    delete:
      tags:
        - Search Fields
      summary: Delete Search Field
      description: >-
        Deletes a search field and moves ordinals of existing search fields to
        fill the gap of the removed field.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: business_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    put:
      tags:
        - Search Fields
      summary: Update Search Field
      description: >+
        Update Search field at a given ordinal. The ordinal in the path is the
        existing ordinal and the ordinal in the body indicates an ordinal move
        if any. The label and prefix must be unique to a business.


        Required Fields

        ---

        __label__ - Label that will render next to the input box on the search
        page.


        __prefix__ - The prefix of tags to search for.



        Optional Fields

        ---

        __ordinal__ - Controls the rendering order of search fields on the
        search page.

      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                label: Color
                prefix: color_
                ordinal: 3
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: business_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/subscriptions/3875411f-fcd3-444a-9691-622d022ff639:
    get:
      tags:
        - Subscriptions
      summary: Get subscription
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/suppliers/32a61bc2-5668-4f0c-9c85-20a4492671b8/inventories:
    post:
      tags:
        - Suppliers > Inventories
      summary: Create inventory item
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                sku: CA-FAKEFAKEFAKE
                upc: asdf141-fasdf1231-sadf-aaaa
                title: Krabby Patty - Testing removal of business ID
                vendor: test 1 2 3
                quantity: 5
                grams: '44.662'
                retailPrice: '19.95'
                condition: NEW
                description: Test 1 2 3
                wholesalePrice: '0.05'
                categories:
                  test: uhm
                images:
                  - image1
                  - image2
                  - image3
                options:
                  color: red
                  size: XL
                  stateOfMatter: gas
                additionalFields:
                  height: '40'
                  width: '20'
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/suppliers/e53b8da6-741b-4ab4-b4b9-42b4747c64bc/inventories/CA-DELETEME:
    delete:
      tags:
        - Suppliers > Inventories
      summary: Delete inventory item
      description: >-
        Deletes an inventory item associated with a supplier. Inventory items
        can only be deleted if there is no variant references that depend on
        them.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/suppliers/9b5aaa6b-7740-488c-b965-9b89a40bc0dd/inventories:
    get:
      tags:
        - Suppliers > Inventories
      summary: Get inventory items for supplier
      description: >-
        Query inventory items for a given supplier.


        Optional query parameters

        ---

        __lastKey__ - ID returned on previous page of results. Used to retrieve
        next page of results when results are paginated.


        __size__ - Integer between 1 and infinity (defaults to 250). Maximum
        number of results to return.


        __count__ - Boolean values of true or false (defaults to false). Should
        query return count of all matched results.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: lastKey
          in: query
          schema:
            type: integer
          example: '00045529859197'
        - name: size
          in: query
          schema:
            type: integer
          example: '300'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/suppliers/32a61bc2-5668-4f0c-9c85-20a4492671b8/inventories/CA-FAKEFAKEFAKE:
    put:
      tags:
        - Suppliers > Inventories
      summary: Update inventory item
      description: "# Optional Fields\r\n__resolveVariants__ - When set to true, any variants that this inventory item is used by will be resolved synchronously. When set to false, variant resolution will be queued up and processed asynchronously. Defaults to _false_.\r\n"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                options:
                  Size: 100 ea
                additionalFields:
                  WindsorQtyOnHand: Maybe kinda yes
                  MfgAddress: 1801 S. Nova Road Daytona Beach, FL 32119
                  GeneralCategory: Supplements
                  Description: Chromium Picolinate, 100 Capsules
                  WholeSalePrice: '4.99'
                  LasQtyOnHand: 'Yes'
                  LogoURL: >-
                    https://www.europasports.com/media/images/logos/png/nutrakey.png
                  Directions: >-
                    Take one capsule (200 mcg) with water or your favorite
                    beverage twice daily on an empty stomach. Take first dose in
                    the morning & second dose one hour prior to lunch.
                  PrimaryCategory: Weight Loss / Energy
                  Image100URL: >-
                    https://www.europasports.com/media/catalog/100/820103309684.jpg
                  UPC: '820103309684'
                  ListDate: '2013-11-18'
                  CaseQty: '12'
                  Depth: '2.000'
                  ChltQtyOnHand: 'Yes'
                  ProductDetails: >-
                    Glucose Metabolism. Essential trace element insulin &
                    glucose regulation.  Pharmaceutical grade. Chromium is a
                    metal. It's called an "essential trace elements" because
                    very small amounts of chromium are necessary for human
                    health. Chromium is used in the body for optimizing blood
                    sugar control and is essential in glucose uptake into muscle
                    cells. The biologically active form of chromium participates
                    in glucose metabolism by enhancing the effects of insulin.
                    Insulin is a peptide hormone produced in the beta-cells of
                    the pancreas. It is central to carbohydrate and fat
                    metabolism. Insulin causes the cells in the skeletal
                    muscles, liver, and fat tissue to absorb glucose from the
                    blood. In the liver and skeletal muscles, glucose is stored
                    as glycogen and in fat cells, as triglycerides. Insulin is
                    provided in the body in a constant proportion to remove
                    excess glucose from the blood, which otherwise would be
                    toxic. When blood glucose levels fall below a certain level,
                    the body begins to use stored sugar as an energy source
                    through glycogenolysis, which breaks down the glycogen
                    stored in the liver and muscle into glucose, which can be
                    utilized as an energy source.
                  CollectionID: '1005940'
                  LabeledAsGlutenFree: '0'
                  ItemName: Chromium Picolinate
                  Height: '4.250'
                  ItemSize: '100'
                  Width: '2.000'
                  StrQtyOnHand: 'No'
                  OrlQtyOnHand: 'Yes'
                  BasicDescription: CHROMIUM PICOLINATE 200mcg100C
                  MAPPrice: '0.00'
                  ThumbNailURL: >-
                    https://www.europasports.com/media/catalog/50/820103309684.gif
                  Ingredients: Gelatin, rice flour.
                  ImageURL: >-
                    https://www.europasports.com/media/catalog/250/820103309684.jpg
                  MesqQtyOnHand: 'Yes'
                  Title: Nutrakey Chromium Picolinate
                  SupplierNumber: '615'
                  FreQtyOnHand: 'Yes'
                  ItemMeasure: ea
                  Brand: Nutrakey
                  Mass: '0.2'
                  Image500URL: >-
                    https://www.europasports.com/media/catalog/500/820103309684.jpg
                  ImageName: '820103309684'
                  ExtendedSize: 100 Capsules
                  SupplierName: NUTRAKEY
                  SuggestedRetailPrice: '8.99'
                  PostDate: '2013-11-27'
                  StockCode: '6150062'
                  Warnings: >-
                    Hypoallergenic: contains no yeast, dairy egg, gluten, corn
                    soy, wheat, sugar, starch, salt, preservatives, or
                    artificial color, flavor or fragrance.
                  SeaTacQtyOnHand: 'No'
                  SupplierWebAddress: http://thenutrakey.com/health/shop/
                categories:
                  secondary: Supplements
                  primary: Weight Loss / Energy
                alphabeticCurrencyCode: USD
                businessId: 9b32e7d4-d6a0-4d86-9c5d-9f6094d692c2
                condition: NEW
                createdAt: '2015-07-29T20:04:00.195Z'
                description: >-
                  <div class="description">Description</div><p>Glucose
                  Metabolism. Essential trace element insulin & glucose
                  regulation.  Pharmaceutical grade. Chromium is a metal. It's
                  called an "essential trace elements" because very small
                  amounts of chromium are necessary for human health. Chromium
                  is used in the body for optimizing blood sugar control and is
                  essential in glucose uptake into muscle cells. The
                  biologically active form of chromium participates in glucose
                  metabolism by enhancing the effects of insulin. Insulin is a
                  peptide hormone produced in the beta-cells of the pancreas. It
                  is central to carbohydrate and fat metabolism. Insulin causes
                  the cells in the skeletal muscles, liver, and fat tissue to
                  absorb glucose from the blood. In the liver and skeletal
                  muscles, glucose is stored as glycogen and in fat cells, as
                  triglycerides. Insulin is provided in the body in a constant
                  proportion to remove excess glucose from the blood, which
                  otherwise would be toxic. When blood glucose levels fall below
                  a certain level, the body begins to use stored sugar as an
                  energy source through glycogenolysis, which breaks down the
                  glycogen stored in the liver and muscle into glucose, which
                  can be utilized as an energy source.</p><div
                  class="directions">Directions</div><p>Take one capsule (200
                  mcg) with water or your favorite beverage twice daily on an
                  empty stomach. Take first dose in the morning & second dose
                  one hour prior to lunch.</p><div
                  class="warnings">Warnings</div><p>Hypoallergenic: contains no
                  yeast, dairy egg, gluten, corn soy, wheat, sugar, starch,
                  salt, preservatives, or artificial color, flavor or
                  fragrance.</p>
                errors: []
                grams: '0'
                images:
                  - >-
                    https://www.europasports.com/media/catalog/500/820103309684.jpg
                quantity: 1
                retailPrice: '8.99'
                sku: CA-FAKEFAKEFAKE
                title: Nutrakey Chromium Picolinate
                upc: '820103309684'
                updatedAt: '2015-07-30T14:18:31.979Z'
                vendor: R.J.'s Awesome Test of Awesomeness
                wholesalePrice: '4.99'
                resolveVariants: false
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/suppliers/c9490497-36e0-4783-9e15-6582fe785d15/inventories/040200:
    get:
      tags:
        - Suppliers > Inventories
      summary: Get inventory item
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/suppliers/98e39ed5-7d32-4a6f-9fe8-93aef390047e/invocations:
    post:
      tags:
        - Suppliers > Invocations
      summary: Invoke Playbook Step
      description: >-
        Invoke a Playbook Step passing in any request body as a message to the
        step.


        Required Fields

        ---

        No required fields. Request body is optional and can take any form.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 201 | Playbook Step has been successfully invoked.  |

        | 400 | One or more fields provided in the request body are invalid. |

        | 404 | Supplier could not be found or user does not have access to the
        business which the supplier is part of. |

        | 502 | Playbook Step invocation has failed. |
      requestBody:
        content:
          text/plain:
            schema:
              type: string
              example: "ordernumber,trackingnumber,carrier,linenumber,sku,qty,actualshipdate,shopifyid\r\n\"EDF158650\",\"VFD10435229\",\"FedEx\",2949242650666,\"TR2MNCC110\",1,\"20190909\",\"85987266346\"\r\n\"EDF158650\",\"VFD10435229\",\"FedEx\",2949242683434,\"TR2WJST060\",1,\"20190909\",\"85987266346\"\r\n\"EDF158684\",\"VFD10435435\",\"FedEx\",2949547261994,\"WR2MNCW080\",1,\"20190909\",\"85987232938\"\r\n\"EDF158684\",\"VFD10435435\",\"FedEx\",2949547294762,\"TR2WJST050\",1,\"20190909\",\"85987232938\"\r\n\"EDF158749\",\"VFD10435433\",\"FedEx\",2950944587818,\"TT1MJST100\",1,\"20190909\",\"85987292234\"\r\n\"EDF158749\",\"VFD10435433\",\"FedEx\",2950944620586,\"TR2MJST100\",1,\"20190909\",\"85987292234\"\r\n\"EDF158761\",\"VFD10435437\",\"FedEx\",2951247495210,\"WR3MNCW120\",1,\"20190909\",\"85987218250\"\r\n\"EDF158761\",\"VFD10435437\",\"FedEx\",2951247527978,\"TL1MNCC130\",1,\"20190909\",\"85987218250\"\r\n\"EDF158765\",\"VFD10435248\",\"FedEx\",2951307198506,\"SL1PAUG019\",1,\"20190909\",\"85987246154\"\r\n\"EDF158765\",\"VFD10435248\",\"FedEx\",2951307231274,\"WR2WAWW100\",1,\"20190909\",\"85987246154\"\r\n\"EDF158770\",\"VFD10435246\",\"FedEx\",2951359299626,\"WR3MSVN130\",1,\"20190909\",\"85987234570\"\r\n\"EDF158770\",\"VFD10435246\",\"FedEx\",2951359332394,\"WR3WSVN090\",1,\"20190909\",\"85987234570\"\r\n\"EDF158793\",\"VFD10435243\",\"FedEx\",2951783383082,\"TS1WACC080\",1,\"20190909\",\"85987215658\"\r\n\"EDF158793\",\"VFD10435243\",\"FedEx\",2951783415850,\"SH1USNA102\",1,\"20190909\",\"85987215658\"\r\n\"EDF158812\",\"VFD10435240\",\"FedEx\",2952021934122,\"WR2WABC080\",1,\"20190909\",\"85987211466\"\r\n\"EDF158812\",\"VFD10435240\",\"FedEx\",2952021966890,\"WR3MSVN110\",1,\"20190909\",\"85987211466\"\r\n\"EDF158865\",\"VFD10435430\",\"FedEx\",2953233694762,\"TL1WNCC090\",1,\"20190909\",\"85987297098\"\r\n\"EDF158865\",\"VFD10435430\",\"FedEx\",2953233727530,\"TS1WPLN090\",1,\"20190909\",\"85987297098\"\r\n\"EDF158865\",\"VFD10435430\",\"FedEx\",2953233760298,\"WL1WSFG090\",1,\"20190909\",\"85987297098\"\r\nEOF\r\n"
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/suppliers/32a61bc2-5668-4f0c-9c85-20a4492671b8:
    put:
      tags:
        - Suppliers
      summary: Update supplier
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                credentials:
                  password: admin
                  username: admin
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/suppliers/c9490497-36e0-4783-9e15-6582fe785d15/actions:
    post:
      tags:
        - Suppliers
      summary: Add manual action
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                action: PRODUCT_UPDATE
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/suppliers:
    get:
      tags:
        - Suppliers
      summary: Get Suppliers for Business
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: 9f5c18b9-fef3-4d75-9dab-ea9a15fb3940
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    post:
      tags:
        - Suppliers
      summary: Create Play Invocation Supplier
      description: >-
        Demonstrates how to create a Play Invocation supplier with playSettings.


        # Required Fields


        *   **playId** - A valid play ID in ChannelApe.

        *   **environmentVariables** - You need to provide any
        environmentVariables for any steps that are a part of the play supplier.
        You can only provide a single value for an environment variable key even
        if the key appears in multiple steps.
            

        # Optional Fields


        *   **orderQueryParameters** - The query parameters used to send orders
        to the playbook step.
            *   **status(Deprecated)**: The status of orders you want to query. Defaults to open
            *   **statuses**: A list of statuses for querying orders. These are the fields used in supplier if they exist. Older suppliers that do not yet have the new statuses field will only query the status field. This defaults to OPEN on creates/updates if not provided.
            *   **channelIds**: A list of channels on your business to query orders from
            *   **purchasedAtMinIntervalMinutes** - Lookback interval for the startDate parameter when query orders while running the step supplier. Defaults to 1440 minutes.
            *   **purchasedAtMaxIntervalMinutes** - Lookback interval for the endDate parameter when query orders while running the step supplier. Defaults to 0 minutes.
            *   **updatedAtMinIntervalMinutes** - Lookback interval for the updatedAtStartDate parameter when query orders while running the step supplier.
            *   **updatedAtMaxIntervalMinutes** - Lookback interval for the updatedAtEndDate parameter when query orders while running the step supplier.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                businessId: 665da8d4-d93d-4cd6-86c6-39827976f056
                enabled: true
                integrationId: 7a3217a3-c04b-4100-9c81-62efaf02adf8
                name: Send Orders to Warehouse
                playSettings:
                  playId: 6a7ad59b-9f25-413b-b787-62cdfb4d6f0b
                  environmentVariables:
                    - name: ALLOW_ONE_DAY_SHIPPING
                      value: 'true'
                    - name: CHANNEL_APE_SECRET_KEY
                      value: pass123
                  maximumConcurrentConnections: '5'
                  orderQueryParameters:
                    purchasedAtMaxIntervalMinutes: '60'
                    purchasedAtMinIntervalMinutes: '10080'
                    channelIds:
                      - 88c3dcfa-6817-11ec-90d6-0242ac120003
                      - 908a115c-6817-11ec-90d6-0242ac120003
                      - 9566060e-6817-11ec-90d6-0242ac120003
                    statuses:
                      - OPEN
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/suppliers/:
    post:
      tags:
        - Suppliers
      summary: Create supplier
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                businessId: e02b7ccb-12b9-4cdb-b28b-89d3d0a5ff90
                integrationId: e4e47fd7-15fa-4276-99a9-6dba0621e68b
                name: Generic Data Feed
                credentials:
                  username: admin
                  password: admin
                fileSettings:
                  sources:
                    - id: '1'
                      fileType: CSV
                      url: https://test-file.example.com/test.csv
                      joinIndex: 8
                      headers: true
                  removedFromFeedTag: RemovedFromMissguidedFeed
                  productMapping:
                    columnIndex: 3
                    sourceId: '1'
                  skuMapping:
                    columnIndex: 8
                    sourceId: '1'
                  primaryCategoryMapping:
                    columnIndex: 6
                    sourceId: '1'
                  secondaryCategoryMapping:
                    columnIndex: 7
                    sourceId: '1'
                  vendorMapping:
                    columnIndex: 1
                    sourceId: '1'
                  titleMapping:
                    - columnIndex: 0
                      sourceId: '1'
                  descriptionMapping:
                    - columnIndex: 5
                      sourceId: '1'
                  retailPriceMapping:
                    columnIndex: 17
                    sourceId: '1'
                    currencyCode: EUR
                  imagesMapping:
                    - columnIndex: 10
                      sourceId: '1'
                    - columnIndex: 11
                      sourceId: '1'
                    - columnIndex: 12
                      sourceId: '1'
                    - columnIndex: 13
                      sourceId: '1'
                    - columnIndex: 14
                      sourceId: '1'
                  optionsMapping:
                    - key: size
                      sourceId: '1'
                      columnIndex: 15
                    - key: color
                      sourceId: '1'
                      columnIndex: 9
                  additionalFieldsMapping:
                    - key: url
                      sourceId: '1'
                      columnIndex: 2
                    - key: productId
                      sourceId: '1'
                      columnIndex: 3
                    - key: timestamp
                      sourceId: '1'
                      columnIndex: 4
                    - key: sizeName
                      sourceId: '1'
                      columnIndex: 15
                    - key: sizeInStock
                      sourceId: '1'
                      columnIndex: 16
                    - key: sizePriceGBP
                      sourceId: '1'
                      columnIndex: 17
                    - key: sizeOldPriceGBP
                      sourceId: '1'
                      columnIndex: 18
                    - key: sizePriceEUR
                      sourceId: '1'
                      columnIndex: 19
                    - key: sizeOldPriceEUR
                      sourceId: '1'
                      columnIndex: 20
                  tagsMapping:
                    - prefix: SizeInStock_
                      sourceId: '1'
                      columnIndex: 16
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/suppliers/8711588f-e78d-4d36-81ed-40d87eb24fc7:
    get:
      tags:
        - Suppliers
      summary: Get supplier
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/suppliers/shopify:
    post:
      tags:
        - Suppliers
      summary: Create Shopify supplier
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                businessId: 0ea98dc8-367c-4288-888a-7872e105dc52
                integrationId: 5d3eface-f513-4ae6-8552-74539e7a6aba
                shopSubdomain: humdingers-business-of-the-americas
                authorizationCode: dc08c9b91c0a516af4c086937891d337
                name: Test Shopify Access Token Generation
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/sessions/:
    post:
      tags:
        - Users
      summary: Create session
      description: >
        Generates a new session ID for a user. Request requires valid username
        and password passed through Basic Authentication.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 201 | Session successfully created.  |

        | 400 | Malformed username, password, or basic authentication token. |

        | 401 | Invalid credentials. |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example: ''
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic dGVzdEBleGFtcGxlLmNvbTpUZXN0
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/sessions/{session_id}:
    get:
      tags:
        - Users
      summary: Get session
      description: >-
        Retrieves a session by ID. Valid session ID will also return the user ID
        the session is associated with.


        HTTP Status Codes

        ---

        |Status  | Meaning |

        |--|--|

        | 200 | Session successfully retrieved.  |

        | 401 | Invalid session ID. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: session_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/users/{user_id}:
    get:
      tags:
        - Users
      summary: Get user
      description: |-
        Retrieves a user by ID. Valid user IDs will also return username.

        HTTP Status Codes
        ---
        |Status  | Meaning |
        |--|--|
        | 200 | User successfully retrieved.  |
        | 404| User could not be found. |
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: user_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/4de8995d-1cb6-45ee-b824-b7d6925f6f91/variantreferences/040285:
    put:
      tags:
        - Variant References
      summary: Update variant reference
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                vendor: 32a61bc2-5668-4f0c-9c85-20a4492671b8
                title: 32a61bc2-5668-4f0c-9c85-20a4492671b8
                grams: 32a61bc2-5668-4f0c-9c85-20a4492671b8
                retailPrice: 32a61bc2-5668-4f0c-9c85-20a4492671b8
                wholesalePrice: 32a61bc2-5668-4f0c-9c85-20a4492671b8
                images: 32a61bc2-5668-4f0c-9c85-20a4492671b8
                optionKeys: 32a61bc2-5668-4f0c-9c85-20a4492671b8
                condition: 32a61bc2-5668-4f0c-9c85-20a4492671b8
                description: 32a61bc2-5668-4f0c-9c85-20a4492671b8
                additionalFields: 32a61bc2-5668-4f0c-9c85-20a4492671b8
                tags:
                  - moist
                  - Adding some Europa tag for testing
                categories: 32a61bc2-5668-4f0c-9c85-20a4492671b8
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    get:
      tags:
        - Variant References
      summary: Get variant reference
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    delete:
      tags:
        - Variant References
      summary: Delete variant reference
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/5c42d9dd-2d40-4465-a1c1-87b6fea91fdb/variantreferences:
    post:
      tags:
        - Variant References
      summary: Create variant reference
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                sku: CA-DELETEME
                upc: CA-DELETEME
                vendor: 0473685d-dcc8-4afa-8ebe-3a7a6296b45a
                title: 0473685d-dcc8-4afa-8ebe-3a7a6296b45a
                grams: 0473685d-dcc8-4afa-8ebe-3a7a6296b45a
                retailPrice: 0473685d-dcc8-4afa-8ebe-3a7a6296b45a
                wholesalePrice: 0473685d-dcc8-4afa-8ebe-3a7a6296b45a
                images: 0473685d-dcc8-4afa-8ebe-3a7a6296b45a
                optionKeys: 0473685d-dcc8-4afa-8ebe-3a7a6296b45a
                condition: 0473685d-dcc8-4afa-8ebe-3a7a6296b45a
                description: 0473685d-dcc8-4afa-8ebe-3a7a6296b45a
                additionalFields: 0473685d-dcc8-4afa-8ebe-3a7a6296b45a
                tags:
                  - green
                  - moist
                  - toxic
                categories: 0473685d-dcc8-4afa-8ebe-3a7a6296b45a
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/4de8995d-1cb6-45ee-b824-b7d6925f6f91/variants/040285:
    get:
      tags:
        - Variants
      summary: Get Variant
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/0c3ebdea-d815-4de3-8927-367e0335ba17/variants:
    get:
      tags:
        - Variants
      summary: Get Product's Variants
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/variants:
    get:
      tags:
        - Variants Search
      summary: Search Variants
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: productFilterId
          in: query
          schema:
            type: string
          example: a9cc3f93-4a94-4132-b4f6-0890507dbaf8
        - name: size
          in: query
          schema:
            type: integer
          example: '100'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/variants/vendors:
    get:
      tags:
        - Variants Search
      summary: Search Variants by Vendor
      description: >-
        Query vendors for a business. Could be used to find vendors given a
        partial match. Only returns a single matched variant even if more
        variants with that same vendor exist.


        Required query parameters

        ---


        __businessId__ - ID of ChannelApe business


        Optional query parameters

        ---


        __vendor__ - Entire or beginning characters of the vendor you wish to
        find in this business.


        __size__ - Integer between 1 and 250 (defaults to 10). Maximum number of
        results to return.


        __count__ - Boolean values of true or false (defaults to false). Should
        query return count of all matched results.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: '{{business_id}}'
        - name: vendor
          in: query
          schema:
            type: string
          example: Cli
        - name: size
          in: query
          schema:
            type: integer
          example: '250'
        - name: count
          in: query
          schema:
            type: boolean
          example: 'false'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/variants/skus:
    get:
      tags:
        - Variants Search
      summary: Search Variants by SKU
      description: >-
        Query SKUs for a business. Could be used to find SKUs given a partial
        match. Only returns a single matched variant even if more variants with
        that same SKU exist.


        Required query parameters

        ---


        __businessId__ - ID of ChannelApe business


        Optional query parameters

        ---


        __sku__ - Entire or beginning characters of the SKU you wish to find in
        this business.


        __size__ - Integer between 1 and 250 (defaults to 10). Maximum number of
        results to return.


        __count__ - Boolean values of true or false (defaults to false). Should
        query return count of all matched results.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: '{{business_id}}'
        - name: sku
          in: query
          schema:
            type: integer
          example: '10'
        - name: size
          in: query
          schema:
            type: integer
          example: '250'
        - name: count
          in: query
          schema:
            type: boolean
          example: 'false'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/variants/upcs:
    get:
      tags:
        - Variants Search
      summary: Search Variants by UPC
      description: >-
        Query UPCs for a business. Could be used to find UPCs given a partial
        match. Only returns a single matched variant even if more variants with
        that same UPC exist.


        Required query parameters

        ---


        __businessId__ - ID of ChannelApe business


        Optional query parameters

        ---


        __upc__ - Entire or beginning characters of the UPC you wish to find in
        this business.


        __size__ - Integer between 1 and 250 (defaults to 10). Maximum number of
        results to return.


        __count__ - Boolean values of true or false (defaults to false). Should
        query return count of all matched results.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: '{{business_id}}'
        - name: upc
          in: query
          schema:
            type: integer
          example: '10'
        - name: size
          in: query
          schema:
            type: integer
          example: '250'
        - name: count
          in: query
          schema:
            type: boolean
          example: 'false'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /v1/products/variants/tags:
    get:
      tags:
        - Variants Search
      summary: Search Variants by tag
      description: >-
        Query tags for a business. Could be used to find tags given a partial
        match. Only returns a single matched variant even if more variants with
        that same tag exist.


        Required query parameters

        ---


        __businessId__ - ID of ChannelApe business


        Optional query parameters

        ---


        __tag__ - Entire or beginning characters of the tag you wish to find in
        this business.


        __size__ - Integer between 1 and 250 (defaults to 10). Maximum number of
        results to return.


        __count__ - Boolean values of true or false (defaults to false). Should
        query return count of all matched results.
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearor {{token}}
        - name: businessId
          in: query
          schema:
            type: string
          example: '{{business_id}}'
        - name: tag
          in: query
          schema:
            type: string
          example: Win
        - name: size
          in: query
          schema:
            type: integer
          example: '250'
        - name: count
          in: query
          schema:
            type: boolean
          example: 'false'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
