{
  "opencollection": "1.0.0",
  "info": {
    "name": "Mirakl Connect Channel Platform APIs Carriers Invoicing and Accounting API",
    "version": "1.0"
  },
  "items": [
    {
      "info": {
        "name": "Invoicing and Accounting",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "DR11 - List accounting documents requests",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://miraklconnect.com/api/channel-platform/api/document-request/requests",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "query",
                "description": "Filter by accounting document request identifier."
              },
              {
                "name": "document_number",
                "value": "",
                "type": "query",
                "description": "Filter by accounting document number."
              },
              {
                "name": "date_created_from",
                "value": "",
                "type": "query",
                "description": "Filter accounting document requests created after the given date."
              },
              {
                "name": "date_created_to",
                "value": "",
                "type": "query",
                "description": "Filter accounting document requests created before the given date."
              },
              {
                "name": "last_updated_from",
                "value": "",
                "type": "query",
                "description": "Filter accounting document requests updated after the given date."
              },
              {
                "name": "last_updated_to",
                "value": "",
                "type": "query",
                "description": "Filter accounting document requests updated before the given date."
              },
              {
                "name": "issue_date_from",
                "value": "",
                "type": "query",
                "description": "Filter accounting document requests issued after the given date."
              },
              {
                "name": "issue_date_to",
                "value": "",
                "type": "query",
                "description": "Filter accounting document requests issued before the given date."
              },
              {
                "name": "state",
                "value": "",
                "type": "query",
                "description": "Filter by accounting document request state. This parameter can be supplied multiple times."
              },
              {
                "name": "type",
                "value": "",
                "type": "query",
                "description": "Filter by accounting document request type. This parameter can be supplied multiple times."
              },
              {
                "name": "issuer_type",
                "value": "",
                "type": "query",
                "description": "Filter by accounting document request issuer type. This parameter can be supplied multiple times."
              },
              {
                "name": "shop_ids",
                "value": "",
                "type": "query",
                "description": "Filter by the shop identifier linked to the accounting document request entity. This parameter can be supplied multiple times."
              },
              {
                "name": "entity_id",
                "value": "",
                "type": "query",
                "description": "Filter by accounting document request entity identifier. This parameter can be supplied multiple times.\n\nThe `entity_type` must be specified to use this filter, otherwise an error 400 will be returned.\n\nExample: `entity_id=order1-A&entity_id=order20-A&entity_type=PRODUCT_LOGISTIC_ORDER`"
              },
              {
                "name": "entity_type",
                "value": "",
                "type": "query",
                "description": "Filter by accounting document request entity type. This parameter can be supplied multiple times."
              },
              {
                "name": "shop_billing_cycle_id",
                "value": "",
                "type": "query",
                "description": "Filter accounting document requests generated by a shop billing cycle having the given identifier.\n\nThis filter is only available for document requests of the type: `FEES`, `ONE_OFF_FEES`, `SHOP_BILLING_CYCLE_PURCHASE_ORDER`."
              },
              {
                "name": "shop_billing_cycle_from",
                "value": "",
                "type": "query",
                "description": "Filter accounting document requests generated by shop billing cycle after the given date.\n\nThis filter is only available for document requests of the type: `FEES`, `ONE_OFF_FEES`, `SHOP_BILLING_CYCLE_PURCHASE_ORDER`.\n\nThis parameter was previously named `billing_cycle_from`, which is still accepted but deprecated."
              },
              {
                "name": "shop_billing_cycle_to",
                "value": "",
                "type": "query",
                "description": "Filter accounting document requests generated by shop billing cycle before the given date.\n\nThis filter is only available for document requests of the type: `FEES`, `ONE_OFF_FEES`, `SHOP_BILLING_CYCLE_PURCHASE_ORDER`.\n\nThis parameter was previously named `billing_cycle_to`, which is still accepted but deprecated."
              },
              {
                "name": "payment_state",
                "value": "",
                "type": "query",
                "description": "Filter by accounting document request payment state.\n\nThis filter is only available for document requests of the type: `SHOP_BILLING_CYCLE_PURCHASE_ORDER`, `LOGISTIC_PURCHASE_ORDER`, `FEES`."
              }
            ]
          },
          "docs": "<div class=\"api-description-extension\">\n<div class=\"extension-title\">Pagination</div>\n\n<p>This resource supports seek pagination (<a href=\"#section/Seek-pagination-and-sort\">see documentation</a>)</p>\n\n<div class=\"extension-title\">Sort fields</div>\n\n<code>sort</code> field can have the following values:<ul><li><b>dateCreated</b> (Default) - Sort by creation date (desc by default)</li></ul>\n\n</div>"
        },
        {
          "info": {
            "name": "DR12 - List lines of a document request",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://miraklconnect.com/api/channel-platform/api/document-request/:document_request_id/lines",
            "params": [
              {
                "name": "document_request_id",
                "value": "",
                "type": "path",
                "description": "Document Request identifier"
              }
            ]
          },
          "docs": "<div class=\"api-description-extension\">\n<div class=\"extension-title\">Pagination</div>\n\n<p>This resource supports seek pagination (<a href=\"#section/Seek-pagination-and-sort\">see documentation</a>)</p>\n\n<div class=\"extension-title\">Sort fields</div>\n\n<code>sort</code> field can have the following values:<ul><li><b>dateCreated</b> - Sort by creation date (asc by default)</li></ul>\n\n</div>"
        },
        {
          "info": {
            "name": "DR73 - Download accounting documents",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://miraklconnect.com/api/channel-platform/api/document-request/documents/download",
            "params": [
              {
                "name": "document_request_id",
                "value": "",
                "type": "query",
                "description": "The document request unique identifier. This parameter can be supplied multiple times."
              },
              {
                "name": "document_id",
                "value": "",
                "type": "query",
                "description": "Document identifiers. This parameter can be supplied multiple times."
              },
              {
                "name": "document_format",
                "value": "",
                "type": "query",
                "description": "Document formats. This parameter can be supplied multiple times."
              },
              {
                "name": "entity_id",
                "value": "",
                "type": "query",
                "description": "Entity identifiers related to the documents to download. This parameter can be supplied multiple times.<br>The <code>entity_type</code> must be specified to use this filter, otherwise an error 400 will be returned.<br>Example: entity_id=order1-A&entity_id=order20-A&entity_type=PRODUCT_LOGISTIC_ORDER"
              },
              {
                "name": "entity_type",
                "value": "",
                "type": "query",
                "description": "Entity types related to the documents to download. This parameter can be supplied multiple times."
              }
            ]
          },
          "docs": "<div class=\"extension-title\">Description</div>\n\nAt least one of the following filters must be applied: <code>document_id</code> or <code>entity_id</code><br>If more than one document is requested, the output of the API will be a ZIP archive.<br>The tree structure of this archive is as follows:<pre>\ndocuments-1624624030618.zip\n|\n|__ product-logistic-order/\n|   |__order1-A/|      |__ INV203837.pdf\n|      |__ INV203837.cxml\n|   |__order1-B/|      |__ INV203839.pdf\n</pre>\n\n<div class=\"api-descriptio"
        },
        {
          "info": {
            "name": "DR74 - Upload accounting documents",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://miraklconnect.com/api/channel-platform/api/document-request/documents/upload",
            "body": {
              "type": "multipart-form",
              "data": [
                {
                  "name": "documents_input",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "files",
                  "type": "text",
                  "value": ""
                }
              ]
            }
          },
          "docs": "<div class=\"extension-title\">Description</div>\n\nDocuments filenames must be distinct.<br>If several formats are required for a document request, they must all be uploaded at once.<br><span class='red'>A maximum of 50 documents can be uploaded simultaneously.</span>\n\n<div class=\"api-description-extension\">\n</div>"
        },
        {
          "info": {
            "name": "IV01 - List accounting documents",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://miraklconnect.com/api/channel-platform/api/invoices",
            "params": [
              {
                "name": "currency",
                "value": "",
                "type": "query",
                "description": "Currency code for filtering"
              },
              {
                "name": "end_date",
                "value": "",
                "type": "query",
                "description": "Creation date for filtering"
              },
              {
                "name": "invoice_id",
                "value": "",
                "type": "query",
                "description": "Invoice IDs for filtering. This parameter can be supplied multiple times or be a comma-separated list."
              },
              {
                "name": "issuing_user_types",
                "value": "",
                "type": "query",
                "description": "A comma separated list of issuing user type for filtering. By default all types are returned"
              },
              {
                "name": "pay_out_psp_codes",
                "value": "",
                "type": "query",
                "description": "A comma-separated list of pay-out PSP codes for filtering. This parameter requires the Hybrid pay-out PSP feature to be enabled."
              },
              {
                "name": "payment_status",
                "value": "",
                "type": "query",
                "description": "Accounting document payment state"
              },
              {
                "name": "payment_voucher_number",
                "value": "",
                "type": "query",
                "description": "Payment voucher for filtering"
              },
              {
                "name": "seller_billing_cycle_id",
                "value": "",
                "type": "query",
                "description": "Seller billing cycle IDs for filtering. This parameter can be supplied multiple times or be a comma-separated list."
              },
              {
                "name": "shop",
                "value": "",
                "type": "query",
                "description": "Shop identifier for filtering"
              },
              {
                "name": "shop_model",
                "value": "",
                "type": "query",
                "description": "A comma separated list of shop model for filtering"
              },
              {
                "name": "shop_operator_internal_id",
                "value": "",
                "type": "query",
                "description": "Operator internal id of the shop for filtering"
              },
              {
                "name": "start_date",
                "value": "",
                "type": "query",
                "description": "Creation date for filtering"
              },
              {
                "name": "states",
                "value": "",
                "type": "query",
                "description": "A comma separated list of state of the accounting document for filtering"
              },
              {
                "name": "type",
                "value": "",
                "type": "query",
                "description": "Accounting document type for filtering. By default only invoices by the shop payment process are returned."
              }
            ]
          },
          "docs": "<div class=\"api-description-extension\">\n<div class=\"extension-title\">Call Frequency</div>\n\n<div class=\"recommended-call-frequency\">Recommended usage: Once per day and as many times as there are invoice pages returned</div>\n<div class=\"max-call-frequency\">Maximum usage: Once per day and as many times as there are invoice pages returned</div>\n<div class=\"extension-title\">Pagination</div>\n\n<p>This resource supports offset pagination (<a href=\"#section/Offset-pagination-and-sort\">see documentation</"
        },
        {
          "info": {
            "name": "IV02 - Download an accounting document",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://miraklconnect.com/api/channel-platform/api/invoices/:accounting_document_id",
            "params": [
              {
                "name": "accounting_document_id",
                "value": "",
                "type": "path",
                "description": "Accounting document identifier"
              }
            ]
          },
          "docs": "<div class=\"api-description-extension\">\n<div class=\"extension-title\">Call Frequency</div>\n\n<div class=\"recommended-call-frequency\">Recommended usage: At each invoice download</div>\n<div class=\"max-call-frequency\">Maximum usage: At each invoice download</div>\n</div>"
        },
        {
          "info": {
            "name": "SBC11 - List seller billing cycles",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://miraklconnect.com/api/channel-platform/api/seller-billing-cycles",
            "params": [
              {
                "name": "currency",
                "value": "",
                "type": "query",
                "description": "Currency for filtering. This parameter can be supplied multiple times."
              },
              {
                "name": "end_date",
                "value": "",
                "type": "query",
                "description": "Creation date used as the maximum value for filtering (inclusive)"
              },
              {
                "name": "id",
                "value": "",
                "type": "query",
                "description": "Seller billing cycle IDs for filtering. This parameter can be supplied multiple times."
              },
              {
                "name": "pay_out_psp_code",
                "value": "",
                "type": "query",
                "description": "A comma-separated list of pay-out PSP codes for filtering. This parameter requires the Hybrid pay-out PSP feature to be enabled."
              },
              {
                "name": "pay_out_state",
                "value": "",
                "type": "query",
                "description": "Pay-out state for filtering. This parameter can be supplied multiple times."
              },
              {
                "name": "payment_voucher_number",
                "value": "",
                "type": "query",
                "description": "Payment voucher numbers for filtering. This parameter can be supplied multiple times."
              },
              {
                "name": "shop_id",
                "value": "",
                "type": "query",
                "description": "Shop ID for filtering. This parameter can be supplied multiple times. Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used."
              },
              {
                "name": "start_date",
                "value": "",
                "type": "query",
                "description": "Creation date used as the minimum value for filtering (inclusive)"
              }
            ]
          },
          "docs": "<div class=\"extension-title\">Description</div>\n\nThis resource uses seek pagination. The maximum allowed value for parameter <code>limit</code> is <code>1000</code>.\n\n<div class=\"api-description-extension\">\n<div class=\"extension-title\">Call Frequency</div>\n\n<div class=\"recommended-call-frequency\">Recommended usage: Once per day and as many times as there are billing cycle pages returned</div>\n<div class=\"max-call-frequency\">Maximum usage: Once per day and as many times as there are billing cycle "
        },
        {
          "info": {
            "name": "TL02 - List transaction lines",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://miraklconnect.com/api/channel-platform/api/sellerpayment/transactions_logs",
            "params": [
              {
                "name": "seller_billing_cycle_id",
                "value": "",
                "type": "query",
                "description": "Seller billing cycle IDs for filtering. This parameter can be supplied multiple times or be a comma-separated list."
              },
              {
                "name": "date_created_from",
                "value": "",
                "type": "query",
                "description": "Creation date"
              },
              {
                "name": "date_created_to",
                "value": "",
                "type": "query",
                "description": "Creation date"
              },
              {
                "name": "transaction_date_from",
                "value": "",
                "type": "query",
                "description": "Transaction date"
              },
              {
                "name": "transaction_date_to",
                "value": "",
                "type": "query",
                "description": "Transaction date"
              },
              {
                "name": "last_updated_from",
                "value": "",
                "type": "query",
                "description": "Last updated date"
              },
              {
                "name": "payment_state",
                "value": "",
                "type": "query",
                "description": "Payment state. This parameter can be supplied multiple times."
              },
              {
                "name": "transaction_type",
                "value": "",
                "type": "query",
                "description": "Transaction type. This parameter can be supplied multiple times."
              },
              {
                "name": "accounting_document_number",
                "value": "",
                "type": "query",
                "description": "Accounting document number"
              },
              {
                "name": "order_id",
                "value": "",
                "type": "query",
                "description": "Order id. This parameter can be supplied multiple times."
              },
              {
                "name": "order_line_id",
                "value": "",
                "type": "query",
                "description": "Order line id. This parameter can be supplied multiple times."
              },
              {
                "name": "order_reference_for_customer",
                "value": "",
                "type": "query",
                "description": "A comma-separated list of order references for customer."
              },
              {
                "name": "order_reference_for_seller",
                "value": "",
                "type": "query",
                "description": "A comma-separated list of order references for seller."
              },
              {
                "name": "accounting_document_id",
                "value": "",
                "type": "query",
                "description": "Accounting document request id. This parameter filters on documents requests with these entity types: <code>SHOP_BILLING_CYCLE_PURCHASE_ORDER</code>, <code>FEES</code> or <code>ONE_OFF_FEES</code>."
              },
              {
                "name": "shop_model",
                "value": "",
                "type": "query",
                "description": "Shop model. This parameter can be supplied multiple times."
              },
              {
                "name": "pay_out_psp_codes",
                "value": "",
                "type": "query",
                "description": "A comma-separated list of pay-out PSP codes. This parameter requires the Hybrid pay-out PSP feature to be enabled."
              },
              {
                "name": "other_reference",
                "value": "",
                "type": "query",
                "description": "An external reference for one-off transactions that are not tied to a Mirakl order. This parameter can be supplied multiple times."
              },
              {
                "name": "shop_id",
                "value": "",
                "type": "query",
                "description": "Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used."
              }
            ]
          },
          "docs": "<div class=\"extension-title\">Description</div>\n\nThis resource uses seek pagination. The maximum allowed value for parameter <code>limit</code> is <code>2000</code>.\n\n<div class=\"api-description-extension\">\n<div class=\"extension-title\">Call Frequency</div>\n\n<div class=\"recommended-call-frequency\">Recommended usage: 20 times per day</div>\n<div class=\"max-call-frequency\">Maximum usage: 20 times per min, 60 times per hour</div>\n<div class=\"extension-title\">Pagination</div>\n\n<p>This resource supports"
        },
        {
          "info": {
            "name": "TL03 - Export transaction lines JSON file asynchronously",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://miraklconnect.com/api/channel-platform/api/sellerpayment/transactions_logs/async",
            "params": [
              {
                "name": "shop_id",
                "value": "",
                "type": "query",
                "description": "Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "<div class=\"extension-title\">Description</div>\n\nThe export is asynchronous. Export status can be retrieved by calling TL04.\n\n<div class=\"api-description-extension\">\n<div class=\"extension-title\">Call Frequency</div>\n\n<div class=\"recommended-call-frequency\">Recommended usage: <br/> once per day</div>\n<div class=\"max-call-frequency\">Maximum usage: <br/> once per day</div>\n</div>"
        },
        {
          "info": {
            "name": "TL04 - Poll the status of an asynchronous transaction log export (TL03)",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://miraklconnect.com/api/channel-platform/api/sellerpayment/transactions_logs/async/status/:tracking_id",
            "params": [
              {
                "name": "tracking_id",
                "value": "",
                "type": "path",
                "description": "The asynchronous transaction log export id"
              },
              {
                "name": "shop_id",
                "value": "",
                "type": "query",
                "description": "Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used."
              }
            ]
          },
          "docs": "<div class=\"extension-title\">Description</div>\n\nRetrieve the status for an TL03 transaction log export.<br/>\nWhen the export is complete, the URLs to retrieve the files are returned.\n\n\n<div class=\"api-description-extension\">\n<div class=\"extension-title\">Call Frequency</div>\n\n<div class=\"recommended-call-frequency\">Recommended usage: Once per minute until you get an error or a success</div>\n<div class=\"max-call-frequency\">Maximum usage: Every 10 seconds</div>\n</div>"
        },
        {
          "info": {
            "name": "TL05 - Retrieve transaction logs files once asynchronous transaction logs export is complete (TL04)",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://miraklconnect.com/api/channel-platform/dynamic-url/The+URL+is+retrieved+from+TL04+output/TL05",
            "params": [
              {
                "name": "tracking_id",
                "value": "",
                "type": "path",
                "description": "The asynchronous transaction log export id"
              },
              {
                "name": "file",
                "value": "",
                "type": "query",
                "description": "The asynchronous transaction log export chunk file"
              },
              {
                "name": "shop_id",
                "value": "",
                "type": "query",
                "description": "Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used."
              }
            ]
          },
          "docs": "<div class=\"extension-title\">Description</div>\n\nRetrieve each chunk of an transaction logs export file via the URL generated once the asynchronous transaction logs export is complete\n\n<div class=\"api-description-extension\">\n</div>"
        }
      ]
    }
  ],
  "bundled": true
}