hipay/hipay-wallet-cashout-mirakl-library

View on GitHub
data/api/mirakl.json

Summary

Maintainability
Test Coverage
{
  "name": "Mirakl",
  "apiVersion": 3.20,
  "description": "",
  "operations": {
    "UpdateVendors": {
      "httpMethod": "PUT",
      "uri": "/api/shops",
      "summary": "Update shops information field by field",
      "parameters": {
        "shops": {
          "type": "array",
          "location": "json",
          "sentAs": "shops",
          "items": {
            "type": "object",
            "properties": {
              "address": {
                "description": "Street address.",
                "location": "json",
                "type": "string",
                "required": false
              },
              "channel_codes": {
                "description": "List of the channel codes associated to the shop.",
                "location": "json",
                "type": "string",
                "required": false
              },
              "closed_from_date": {
                "description": "Date: if defined, this shop will be closed on this date. Nullable.",
                "location": "json",
                "type": "string",
                "required": false
              },
              "description": {
                "description": "Description of the shop. Nullable.",
                "location": "json",
                "type": "string",
                "required": false
              },
              "email": {
                "description": "Email of the shop. Cannot be null.",
                "location": "json",
                "type": "string",
                "required": false
              },
              "fax": {
                "description": "Fax of the shop. Nullable.",
                "location": "json",
                "type": "string",
                "required": false
              },
              "immunity_date": {
                "description": "The date until the shop is immunized from being suspended by the batch. Must be in the future. Nullable.",
                "location": "json",
                "type": "string",
                "required": false
              },
              "is_professional": {
                "description": "Whether or not the shop is professional. Cannot be null.",
                "location": "json",
                "type": "string",
                "required": false
              },
              "kyc": {
                "description": "KYC information (only supported when KYC feature is enabled)",
                "location": "json",
                "type": "object",
                "required": false,
                "properties": {
                  "reason": {
                    "description": "KYC refusal reason. Ignored if KYC status is not REFUSED. Max length: 1000 characters.",
                    "location": "json",
                    "type": "string",
                    "required": false
                  },
                  "status": {
                    "description": "KYC status",
                    "location": "json",
                    "type": "string",
                    "required": false
                  }
                }
              },
              "operator_internal_id": {
                "description": "Operator internal id for the shop. Nullable.",
                "location": "json",
                "type": "string",
                "required": false
              },
              "shop_id": {
                "description": "Id of the shop to be updated",
                "location": "json",
                "type": "integer",
                "required": true
              },
              "suspend": {
                "description": "Suspended state of the shop. Cannot be null.\n",
                "location": "json",
                "type": "boolean",
                "required": false
              }
            }
          }
        }
      }
    },
    "GetVendors": {
      "httpMethod": "GET",
      "uri": "/api/shops",
      "summary": "Fetch all shops from Mirakl",
      "parameters": {
        "shopIds": {
          "type": "array",
          "required": false,
          "location": "query",
          "sentAs": "shop_ids",
          "filters": [
            {
              "method": "join",
              "args": [
                ",",
                "@value"
              ]
            }
          ]
        },
        "updatedSince": {
          "type": "object",
          "instanceOf": "DateTime",
          "location": "query",
          "sentAs": "updated_since",
          "filters": [
            {
              "method": "date_format",
              "args": [
                "@value",
                "Y-m-d"
              ]
            }
          ]
        },
        "paginate": {
          "type": "boolean",
          "default": false,
          "description": "[optional] Control the pagination usage. Default: false (different from api)",
          "location": "query",
          "sentAs": "paginate",
          "filters": [
            {
              "method": "json_encode",
              "args": [
                "@value"
              ]
            }
          ]
        }
      }
    },
    "GetDocuments": {
      "httpMethod": "GET",
      "uri": "/api/shops/documents",
      "summary": "List documents from Mirakl",
      "parameters": {
        "shopIds": {
          "type": "array",
          "required": true,
          "description": "",
          "location": "query",
          "sentAs": "shop_ids",
          "filters": [
            {
              "method": "join",
              "args": [
                ",",
                "@value"
              ]
            }
          ]
        }
      }
    },
    "DownloadDocuments": {
      "httpMethod": "GET",
      "uri": "/api/shops/documents/download",
      "summary": "Download documents from Mirakl",
      "parameters": {
        "shopIds": {
          "type": "array",
          "required": false,
          "location": "query",
          "sentAs": "shop_ids",
          "filters": [
            {
              "method": "join",
              "args": [
                ",",
                "@value"
              ]
            }
          ]
        },
        "documentIds": {
          "type": "array",
          "required": false,
          "location": "query",
          "sentAs": "document_ids",
          "filters": [
            {
              "method": "join",
              "args": [
                ",",
                "@value"
              ]
            }
          ]
        },
        "typeCodes": {
          "type": "array",
          "required": false,
          "location": "query",
          "sentAs": "type_codes",
          "filters": [
            {
              "method": "join",
              "args": [
                ",",
                "@value"
              ]
            }
          ]
        }
      }
    },
    "GetInvoices": {
      "httpMethod": "GET",
      "uri": "/api/invoices",
      "summary": "List accounting documents",
      "parameters": {
        "shop": {
          "required": false,
          "type": "integer",
          "description": "[optional] Identifier of the shop for filtering",
          "location": "query",
          "sentAs": "shop"
        },
        "startDate": {
          "required": false,
          "type": "object",
          "instanceOf": "DateTime",
          "description": "creation date for filtering. Format: 'yyyy-MM-dd'T'HH:mm:ss'",
          "location": "query",
          "sentAs": "start_date",
          "filters": [
            {
              "method": "date_format",
              "args": [
                "@value",
                "Y-m-d\\TH:i:s\\Z"
              ]
            }
          ]
        },
        "endDate": {
          "required": false,
          "type": "object",
          "instanceOf": "DateTime",
          "description": "creation date for filtering. Format: 'yyyy-MM-dd'T'HH:mm:ss'",
          "location": "query",
          "sentAs": "end_date",
          "filters": [
            {
              "method": "date_format",
              "args": [
                "@value",
                "Y-m-d\\TH:i:s\\Z"
              ]
            }
          ]
        },
        "type": {
          "required": false,
          "type": "string",
          "description": "[optional] [ALL, AUTO_INVOICE, MANUAL_INVOICE, MANUAL_CREDIT] Type of the accounting document for filtering. Default value is AUTO_INVOICE which represent invoices generated by shop payment.",
          "location": "query",
          "sentAs": "type"
        },
        "currency": {
          "required": false,
          "type": "string",
          "description": "[optional] Currency iso code for filtering",
          "location": "query",
          "sentAs": "currency"
        },
        "max": {
          "required": false,
          "type": "integer",
          "description": "The max parameter is used to indicate the maximum number of items returned per page.",
          "location": "query",
          "sentAs": "max"
        },
        "offset": {
          "required": false,
          "type": "integer",
          "description": "The offset parameter is used to indicate the index of the first item (among all the results) in the returned page.",
          "location": "query",
          "sentAs": "offset"
        }
      }
    },
    "DocumentTypesDto": {
      "httpMethod": "GET",
      "uri": "/api/documents",
      "summary": "Get the list of all documents configuration DO01",
      "parameters": {
        "entities": {
          "required": false,
          "type": "string",
          "description": "A comma separated list of values, representing the type of entities the document type should be related to. Ex: ORDER,SHOP",
          "location": "query",
          "sentAs": "entities"
        }
      }
    }
  }
}