{ "openapi": "3.0.1", "info": { "title": "Aeropost Courier API", "description": "", "contact": {}, "version": "1.59.0" }, "servers": [ { "url": "https://myaccountexternal-devel.aeropost.com", "description": "Development" }, { "url": "https://apmyaccountexternal-api.aeropost.com", "description": "Production" }, { "url": "http://localhost:8081", "description": "Localhost" } ], "security": [ { "security_auth_password": [], "security_auth_pkce": [] } ], "tags": [ { "name": "Couriers", "description": "Endpoints for couriers management." }, { "name": "PreAlerts", "description": "Endpoints for PreAlert management." }, { "name": "Packages", "description": "Endpoints for packages management." }, { "name": "Consignees", "description": "Endpoints for consignees management." } ], "paths": { "/api/pre-alerts/{id}": { "get": { "tags": [ "PreAlerts" ], "summary": "Get PreAlert", "description": "Get package PreAlert by id", "operationId": "get_1", "parameters": [ { "name": "id", "in": "path", "description": "PreAlert id", "required": true, "schema": { "type": "integer", "description": "PreAlert id", "example": 1234567 }, "example": 1234567 } ], "responses": { "200": { "description": "Return a PreAlert that was previously created", "content": { "application/json": { "schema": { "required": [ "consignee", "language", "packageInformation", "storeName" ], "type": "object", "properties": { "id": { "type": "integer", "description": "Unique PreAlert identification (Only required for /api/preAlert/update)", "format": "int32", "default": 0 }, "consignee": { "required": [ "email", "fullName" ], "type": "object", "properties": { "fullName": { "type": "string", "description": "Full name of the consignee", "example": "Aeropost Test" }, "email": { "type": "string", "description": "Email of the consignee", "example": "test@aeropost.com" }, "isOwner": { "type": "boolean", "description": "Represents whether consignee is the account owner.", "example": true }, "id": { "type": "integer", "description": "Consignee unique id", "format": "int64" } } }, "storeName": { "type": "string", "description": "Store name where the package was bought", "example": "AMAZON.COM" }, "packageInformation": { "required": [ "courier", "courierTracking", "description", "value" ], "type": "object", "properties": { "courier": { "type": "object", "properties": { "id": { "type": "integer", "description": "Courier id for Aeropost", "format": "int32", "example": 7, "default": 0 }, "name": { "type": "string", "description": "Courier company name", "example": "UPS", "default": "Other" }, "regex": { "type": "string", "description": "When get available courier companies, this regex can be used to match a tracking number with a courier company.", "example": "1Z\\d{16}" } } }, "value": { "type": "number", "description": "Value of the package", "format": "double", "example": 100.23 }, "description": { "type": "string", "description": "Description of the package", "example": "Shoes" }, "courierTracking": { "type": "string", "description": "Courier tracking number", "example": "1Z9999999999999999" } }, "description": "Package information" }, "attachedInvoices": { "type": "array", "description": "Package files (Invoices, pictures, etc)", "items": { "required": [ "data", "documentType", "fileName", "tracking" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "tracking": { "type": "string", "description": "Aerotrack or courier tracking number", "example": "1Z9999999999999999" }, "fileName": { "type": "string", "description": "File name", "example": "invoice.pdf" }, "documentType": { "type": "integer", "description": "Possible values: 0 = Unknow, 1 = Invoice, 2 = Other, 3 = PackagePicture, 4 = POD_Signature", "format": "int32", "default": 1, "enum": [ 0, 1, 2, 3, 4 ] }, "data": { "type": "string", "description": "Base64 File or URL. To upload a file, send a Base64 file; when you get attachments a URL will be returned" } }, "description": "Package files (Invoices, pictures, etc)" } }, "language": { "type": "string", "description": "Possible values: es = Spanish, en = English", "default": "en", "enum": [ "es", "en" ] } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "entityName": { "type": "string", "example": "entityName" }, "errorKey": { "type": "string", "example": "errorKey" }, "errorList": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "example": "0000" }, "description": { "type": "string", "example": "Aerotrack parameter can't be null or empty" } } } }, "title": { "type": "string", "example": "Bad Request" }, "status": { "type": "integer", "format": "int64", "example": 400 }, "detail": { "type": "string", "example": "The request is invalid." } } } } } }, "401": { "description": "Unauthorized: Full authentication is required to access this resource" }, "404": { "description": "Prealert not found" } } }, "put": { "tags": [ "PreAlerts" ], "summary": "Update PreAlert", "description": "Update a previously created Pre Alert", "operationId": "update", "parameters": [ { "name": "language", "in": "query", "description": "Possible values: es = Spanish, en = English", "required": false, "schema": { "type": "string", "default": "en", "enum": [ "en", "es" ] } }, { "name": "id", "in": "path", "description": "PreAlert id", "required": true, "schema": { "type": "integer", "description": "PreAlert id", "example": 1234567 }, "example": 1234567 } ], "requestBody": { "content": { "application/json": { "schema": { "required": [ "consigneeId", "courierId", "courierTracking", "description", "storeName", "value" ], "type": "object", "properties": { "consigneeId": { "type": "integer", "description": "Consignee id. Do a GET request to /api/consignees to obtain available consignees in your account", "format": "int64", "example": 1234567 }, "courierId": { "type": "integer", "description": "Courier id. Do a GET request to /api/couriers to obtain available couriers", "format": "int32", "example": 7, "default": 0 }, "courierTracking": { "type": "string", "description": "Courier tracking number", "example": "1Z9999999999999999" }, "storeName": { "type": "string", "description": "Store name where the package was bought", "example": "AMAZON.COM" }, "value": { "type": "number", "description": "Value of the package", "format": "double", "example": 100.23 }, "description": { "type": "string", "description": "Description of the package", "example": "Shoes" }, "attachments": { "type": "array", "description": "Package invoices", "items": { "required": [ "data", "fileName" ], "type": "object", "properties": { "fileName": { "type": "string", "description": "File name with extension", "example": "invoice.pdf" }, "data": { "type": "string", "description": "Base64 File or URL. To upload a file, send a Base64 file; when you get attachments a URL will be returned" } }, "description": "Package invoices" } } }, "description": "PreAlert package data" } } }, "required": true }, "responses": { "204": { "description": "No content, it means that PreAlert was updated successfully" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "entityName": { "type": "string", "example": "entityName" }, "errorKey": { "type": "string", "example": "errorKey" }, "errorList": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "example": "0000" }, "description": { "type": "string", "example": "Aerotrack parameter can't be null or empty" } } } }, "title": { "type": "string", "example": "Bad Request" }, "status": { "type": "integer", "format": "int64", "example": 400 }, "detail": { "type": "string", "example": "The request is invalid." } } } } } }, "401": { "description": "Unauthorized: Full authentication is required to access this resource" }, "500": { "description": "Unhadled error was generated" } } }, "delete": { "tags": [ "PreAlerts" ], "summary": "Delete PreAlert", "description": "Delete package PreAlert by id", "operationId": "delete", "parameters": [ { "name": "id", "in": "path", "description": "PreAlert id", "required": true, "schema": { "type": "integer", "description": "PreAlert id", "example": 1234567 }, "example": 1234567 } ], "responses": { "204": { "description": "No content, it means that PreAlert was deleted successfully" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "entityName": { "type": "string", "example": "entityName" }, "errorKey": { "type": "string", "example": "errorKey" }, "errorList": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "example": "0000" }, "description": { "type": "string", "example": "Aerotrack parameter can't be null or empty" } } } }, "title": { "type": "string", "example": "Bad Request" }, "status": { "type": "integer", "format": "int64", "example": 400 }, "detail": { "type": "string", "example": "The request is invalid." } } } } } }, "401": { "description": "Unauthorized: Full authentication is required to access this resource" }, "404": { "description": "Prealert not found" }, "500": { "description": "Unhadled error was generated" } } } }, "/api/pre-alerts": { "post": { "tags": [ "PreAlerts" ], "summary": "Create PreAlert", "description": "Create package PreAlert", "operationId": "create", "parameters": [ { "name": "language", "in": "query", "description": "Possible values: es = Spanish, en = English", "required": false, "schema": { "type": "string", "default": "en", "enum": [ "en", "es" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "required": [ "consigneeId", "courierId", "courierTracking", "description", "storeName", "value" ], "type": "object", "properties": { "consigneeId": { "type": "integer", "description": "Consignee id. Do a GET request to /api/consignees to obtain available consignees in your account", "format": "int64", "example": 1234567 }, "courierId": { "type": "integer", "description": "Courier id. Do a GET request to /api/couriers to obtain available couriers", "format": "int32", "example": 7, "default": 0 }, "courierTracking": { "type": "string", "description": "Courier tracking number", "example": "1Z9999999999999999" }, "storeName": { "type": "string", "description": "Store name where the package was bought", "example": "AMAZON.COM" }, "value": { "type": "number", "description": "Value of the package", "format": "double", "example": 100.23 }, "description": { "type": "string", "description": "Description of the package", "example": "Shoes" }, "attachments": { "type": "array", "description": "Package invoices", "items": { "required": [ "data", "fileName" ], "type": "object", "properties": { "fileName": { "type": "string", "description": "File name with extension", "example": "invoice.pdf" }, "data": { "type": "string", "description": "Base64 File or URL. To upload a file, send a Base64 file; when you get attachments a URL will be returned" } }, "description": "Package invoices" } } }, "description": "PreAlert package data" } } }, "required": true }, "responses": { "201": { "description": "Returns created PreAlert", "content": { "application/json": { "schema": { "required": [ "consigneeId", "courierId", "courierTracking", "description", "storeName", "value" ], "type": "object", "properties": { "consigneeId": { "type": "integer", "description": "Consignee id. Do a GET request to /api/consignees to obtain available consignees in your account", "format": "int64", "example": 1234567 }, "courierId": { "type": "integer", "description": "Courier id. Do a GET request to /api/couriers to obtain available couriers", "format": "int32", "example": 7, "default": 0 }, "courierTracking": { "type": "string", "description": "Courier tracking number", "example": "1Z9999999999999999" }, "storeName": { "type": "string", "description": "Store name where the package was bought", "example": "AMAZON.COM" }, "value": { "type": "number", "description": "Value of the package", "format": "double", "example": 100.23 }, "description": { "type": "string", "description": "Description of the package", "example": "Shoes" }, "id": { "type": "integer", "description": "PreAlert identification", "format": "int32", "example": 1234567 }, "attachments": { "type": "array", "description": "Package invoices", "items": { "required": [ "data", "fileName" ], "type": "object", "properties": { "fileName": { "type": "string", "description": "File name with extension", "example": "invoice.pdf" }, "data": { "type": "string", "description": "Base64 File or URL. To upload a file, send a Base64 file; when you get attachments a URL will be returned" }, "id": { "type": "integer", "description": "PreAlert invoice id", "format": "int32", "example": 12345 } }, "description": "Package invoices" } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "entityName": { "type": "string", "example": "entityName" }, "errorKey": { "type": "string", "example": "errorKey" }, "errorList": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "example": "0000" }, "description": { "type": "string", "example": "Aerotrack parameter can't be null or empty" } } } }, "title": { "type": "string", "example": "Bad Request" }, "status": { "type": "integer", "format": "int64", "example": 400 }, "detail": { "type": "string", "example": "The request is invalid." } } } } } }, "401": { "description": "Unauthorized: Full authentication is required to access this resource" }, "409": { "description": "Package already in Miami, please check details and errors for further instructions.", "content": { "application/json": { "schema": { "type": "object", "properties": { "entityName": { "type": "string", "example": "entityName" }, "errorKey": { "type": "string", "example": "errorKey" }, "errorList": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "example": "0000" }, "description": { "type": "string", "example": "Aerotrack parameter can't be null or empty" } } } }, "title": { "type": "string", "example": "Bad Request" }, "status": { "type": "integer", "format": "int64", "example": 400 }, "detail": { "type": "string", "example": "The request is invalid." } } } } } }, "500": { "description": "Unhadled error was generated" } } } }, "/api/v2/packages": { "get": { "tags": [ "Packages" ], "summary": "Get account packages", "description": "Returns the list of packages that match the provided filters.", "operationId": "packages", "parameters": [ { "name": "language", "in": "query", "description": "Possible values: es = Spanish, en = English", "required": false, "schema": { "type": "string", "default": "en", "enum": [ "en", "es" ] } }, { "name": "pageIndex", "in": "query", "description": "Page index", "schema": { "type": "integer", "example": 0 } }, { "name": "pageSize", "in": "query", "description": "Page size", "schema": { "type": "integer", "example": 10 } }, { "name": "inTransit", "in": "query", "description": "Returns only in transit packages", "schema": { "type": "boolean" } }, { "name": "readyForPickUp", "in": "query", "description": "Returns only ready for pick up packages", "schema": { "type": "boolean" } }, { "name": "delivered", "in": "query", "description": "Returns only delivered packages", "schema": { "type": "boolean" } }, { "name": "preAlerts", "in": "query", "description": "Returns only package pre alerts", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "List of account packages", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "packages": { "type": "array", "description": "List of packages that match the provided filters", "items": { "type": "object", "properties": { "statusCode": { "type": "string", "description": "Current status code", "example": "02" }, "aerotrack": { "type": "string", "description": "Aeropost tracking number", "example": "MIA000039502012" }, "store": { "type": "string", "description": "Store where package was bought", "example": "EBAY KEVIN MECA." }, "description": { "type": "string", "description": "Package description", "example": "FOLLETO" }, "statusName": { "type": "string", "description": "Current status name/description", "example": "Preparing for shipment" }, "consignee": { "type": "string", "description": "Consignee name", "example": "TEST ACCOUNT AA" }, "account": { "type": "integer", "description": "Account number", "format": "int32", "example": 9 }, "gateway": { "type": "string", "description": "Aeropost gateway code", "example": "SCL" }, "courierTracking": { "type": "string", "description": "Courier tracking number", "example": "TESTSCL9478347676456" }, "courierName": { "type": "string", "description": "Courier name", "example": "Aeropost" }, "date": { "type": "string", "description": "Date package was received or created", "format": "date-time", "example": "2023-10-25T16:57:24Z" }, "declaredValue": { "type": "number", "description": "Declared value", "format": "float", "example": 50.2 }, "weightKilos": { "type": "number", "description": "Weight in kilos", "format": "float", "example": 1.361 }, "weightPounds": { "type": "number", "description": "Weight in pounds", "format": "float", "example": 3.5 }, "totalCharges": { "type": "number", "description": "Total charges in USD if available", "format": "float", "example": 25.5 }, "totalChargesLocal": { "type": "number", "description": "Total charges in local currency if available", "format": "float", "example": 1500.25 }, "hasAnAlert": { "type": "boolean", "description": "True if package has an alert", "example": false }, "isThirdParty": { "type": "boolean", "description": "True if package is from a shipper", "example": false }, "isAccountFirstPackage": { "type": "boolean", "description": "True if package is the first package of the account", "example": false }, "speedType": { "type": "string", "description": "Speed type", "example": "Air" }, "speedTypeCode": { "type": "string", "description": "Speed type code", "example": "SP01" }, "hasWebInvoice": { "type": "boolean", "description": "True if package has a web invoice", "example": true }, "attachments": { "type": "array", "description": "List of attachments (invoices, photos, etc.)", "items": { "type": "object", "properties": { "category": { "type": "integer", "description": "Possible values: 0 = Unknow, 1 = Invoice, 2 = Other, 3 = PackagePicture, 4 = POD_Signature", "format": "int32", "example": 1, "enum": [ 0, 1, 2, 3, 4 ] }, "creationDate": { "type": "string", "description": "Creation date", "example": "2023-10-25T16:57:50.230+00:00" }, "description": { "type": "string", "description": "Attachment description", "example": "Invoice" }, "id": { "type": "integer", "description": "Attachment id", "format": "int32", "example": 8783215 }, "name": { "type": "string", "description": "Attachment file name with extension", "example": "Invoice(f1687).html" }, "url": { "type": "string", "description": "Download url", "example": "https://test.com/inoviceDowload?id=8783215" } }, "description": "List of attachments (invoices, photos, etc.)" } }, "consigneeEmail": { "type": "string", "description": "Consignee email", "example": "test@aeropost.com" }, "lastUpdate": { "type": "string", "description": "Last date and time the package was updated", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isPreAlerted": { "type": "boolean", "description": "True if package was pre-alert", "example": false }, "graphicStationId": { "type": "integer", "description": "It represents a global stage in which the package is currently located. It could contain these values:\r\n-1 = No stage\r\n 0 = In transit to miami\r\n 3 = In Miami\r\n 4 = In transit to country\r\n 5 = In country\r\n 6 = Out for delivery\r\n 7 = Ready for pickup\r\n 8 = Delivered", "format": "int32", "example": 3, "enum": [ -1, 0, 3, 4, 5, 6, 7, 8 ] }, "cifvalue": { "type": "number", "description": "Value that was declared to customs. CIF = Cost, Insurance and Freight", "format": "float", "example": 30.5 }, "cifvalueLocal": { "type": "number", "description": "Value that was declared to customs returned in local currency (The local currency will be calculated with the exchange rate of the day). CIF = Cost, Insurance and Freight", "format": "float", "example": 6921.12 }, "customsTicket": { "type": "string", "description": "Customs ticket number, if available. It refers to DUA number, OEA number, etc.", "example": "3404703132" }, "dimensionsInches": { "type": "object", "properties": { "length": { "type": "number", "format": "double" }, "width": { "type": "number", "format": "double" }, "height": { "type": "number", "format": "double" } }, "description": "Package dimensions in inches if available" }, "volumetricWeight": { "type": "number", "description": "Volumetric weight in cubic feet if available", "format": "float" } } } }, "totalItems": { "type": "integer", "description": "Total number of packages that match the provided filters", "format": "int32", "example": 210 } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "entityName": { "type": "string", "example": "entityName" }, "errorKey": { "type": "string", "example": "errorKey" }, "errorList": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "example": "0000" }, "description": { "type": "string", "example": "Aerotrack parameter can't be null or empty" } } } }, "title": { "type": "string", "example": "Bad Request" }, "status": { "type": "integer", "format": "int64", "example": 400 }, "detail": { "type": "string", "example": "The request is invalid." } } } } } }, "401": { "description": "Unauthorized: Full authentication is required to access this resource" }, "500": { "description": "Unhadled error was generated" } } } }, "/api/v2/packages/{tracking}": { "get": { "tags": [ "Packages" ], "summary": "Get package", "description": "Returns a package by aerotrack or courier number", "operationId": "get", "parameters": [ { "name": "tracking", "in": "path", "description": "Aerotrack or courier number", "required": true, "schema": { "type": "string" }, "example": "MIA000039502012" }, { "name": "language", "in": "query", "description": "Possible values: es = Spanish, en = English", "required": false, "schema": { "type": "string", "default": "en", "enum": [ "en", "es" ] } } ], "responses": { "200": { "description": "Return package information", "content": { "application/json": { "schema": { "type": "object", "properties": { "statusCode": { "type": "string", "description": "Current status code", "example": "02" }, "aerotrack": { "type": "string", "description": "Aeropost tracking number", "example": "MIA000039502012" }, "store": { "type": "string", "description": "Store where package was bought", "example": "EBAY KEVIN MECA." }, "description": { "type": "string", "description": "Package description", "example": "FOLLETO" }, "statusName": { "type": "string", "description": "Current status name/description", "example": "Preparing for shipment" }, "consignee": { "type": "string", "description": "Consignee name", "example": "TEST ACCOUNT AA" }, "account": { "type": "integer", "description": "Account number", "format": "int32", "example": 9 }, "gateway": { "type": "string", "description": "Aeropost gateway code", "example": "SCL" }, "courierTracking": { "type": "string", "description": "Courier tracking number", "example": "TESTSCL9478347676456" }, "courierName": { "type": "string", "description": "Courier name", "example": "Aeropost" }, "date": { "type": "string", "description": "Date package was received or created", "format": "date-time", "example": "2023-10-25T16:57:24Z" }, "declaredValue": { "type": "number", "description": "Declared value", "format": "float", "example": 50.2 }, "weightKilos": { "type": "number", "description": "Weight in kilos", "format": "float", "example": 1.361 }, "weightPounds": { "type": "number", "description": "Weight in pounds", "format": "float", "example": 3.5 }, "totalCharges": { "type": "number", "description": "Total charges in USD if available", "format": "float", "example": 25.5 }, "totalChargesLocal": { "type": "number", "description": "Total charges in local currency if available", "format": "float", "example": 1500.25 }, "hasAnAlert": { "type": "boolean", "description": "True if package has an alert", "example": false }, "isThirdParty": { "type": "boolean", "description": "True if package is from a shipper", "example": false }, "isAccountFirstPackage": { "type": "boolean", "description": "True if package is the first package of the account", "example": false }, "speedType": { "type": "string", "description": "Speed type", "example": "Air" }, "speedTypeCode": { "type": "string", "description": "Speed type code", "example": "SP01" }, "hasWebInvoice": { "type": "boolean", "description": "True if package has a web invoice", "example": true }, "attachments": { "type": "array", "description": "List of attachments (invoices, photos, etc.)", "items": { "type": "object", "properties": { "category": { "type": "integer", "description": "Possible values: 0 = Unknow, 1 = Invoice, 2 = Other, 3 = PackagePicture, 4 = POD_Signature", "format": "int32", "example": 1, "enum": [ 0, 1, 2, 3, 4 ] }, "creationDate": { "type": "string", "description": "Creation date", "example": "2023-10-25T16:57:50.230+00:00" }, "description": { "type": "string", "description": "Attachment description", "example": "Invoice" }, "id": { "type": "integer", "description": "Attachment id", "format": "int32", "example": 8783215 }, "name": { "type": "string", "description": "Attachment file name with extension", "example": "Invoice(f1687).html" }, "url": { "type": "string", "description": "Download url", "example": "https://test.com/inoviceDowload?id=8783215" } }, "description": "List of attachments (invoices, photos, etc.)" } }, "consigneeEmail": { "type": "string", "description": "Consignee email", "example": "test@aeropost.com" }, "lastUpdate": { "type": "string", "description": "Last date and time the package was updated", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isPreAlerted": { "type": "boolean", "description": "True if package was pre-alert", "example": false }, "graphicStationId": { "type": "integer", "description": "It represents a global stage in which the package is currently located. It could contain these values:\r\n-1 = No stage\r\n 0 = In transit to miami\r\n 3 = In Miami\r\n 4 = In transit to country\r\n 5 = In country\r\n 6 = Out for delivery\r\n 7 = Ready for pickup\r\n 8 = Delivered", "format": "int32", "example": 3, "enum": [ -1, 0, 3, 4, 5, 6, 7, 8 ] }, "cifvalue": { "type": "number", "description": "Value that was declared to customs. CIF = Cost, Insurance and Freight", "format": "float", "example": 30.5 }, "cifvalueLocal": { "type": "number", "description": "Value that was declared to customs returned in local currency (The local currency will be calculated with the exchange rate of the day). CIF = Cost, Insurance and Freight", "format": "float", "example": 6921.12 }, "customsTicket": { "type": "string", "description": "Customs ticket number, if available. It refers to DUA number, OEA number, etc.", "example": "3404703132" }, "dimensionsInches": { "type": "object", "properties": { "length": { "type": "number", "format": "double" }, "width": { "type": "number", "format": "double" }, "height": { "type": "number", "format": "double" } }, "description": "Package dimensions in inches if available" }, "volumetricWeight": { "type": "number", "description": "Volumetric weight in cubic feet if available", "format": "float" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "entityName": { "type": "string", "example": "entityName" }, "errorKey": { "type": "string", "example": "errorKey" }, "errorList": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "example": "0000" }, "description": { "type": "string", "example": "Aerotrack parameter can't be null or empty" } } } }, "title": { "type": "string", "example": "Bad Request" }, "status": { "type": "integer", "format": "int64", "example": 400 }, "detail": { "type": "string", "example": "The request is invalid." } } } } } }, "401": { "description": "Unauthorized: Full authentication is required to access this resource" }, "404": { "description": "Package not found" }, "500": { "description": "Unhadled error was generated" } } } }, "/api/v2/packages/{tracking}/status-history": { "get": { "tags": [ "Packages" ], "summary": "Get status history", "description": "Returns the package status history", "operationId": "getStatusHistory", "parameters": [ { "name": "tracking", "in": "path", "description": "Aeropost tracking number (Aerotrack)", "required": true, "schema": { "type": "string" }, "example": "MIA000039502012" }, { "name": "language", "in": "query", "description": "Possible values: es = Spanish, en = English", "required": false, "schema": { "type": "string", "default": "en", "enum": [ "en", "es" ] } } ], "responses": { "200": { "description": "Status history data", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string", "description": "Date and time the status was generated (Miami Time)", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "gateway": { "type": "string", "description": "Gateway where the status was generated", "example": "MIA" }, "status": { "type": "object", "properties": { "description": { "type": "string", "description": "Status description", "example": "Received in Aeropost Miami" }, "statusCodes": { "type": "array", "description": "List of status codes that current status can have", "example": [ "01", "34" ], "items": { "type": "string", "description": "List of status codes that current status can have", "example": "[\"01\",\"34\"]" } } }, "description": "Status information" }, "gatewayDescription": { "type": "string", "description": "Gateway name", "example": "Miami, Florida" }, "comments": { "type": "array", "items": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "entityName": { "type": "string", "example": "entityName" }, "errorKey": { "type": "string", "example": "errorKey" }, "errorList": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "example": "0000" }, "description": { "type": "string", "example": "Aerotrack parameter can't be null or empty" } } } }, "title": { "type": "string", "example": "Bad Request" }, "status": { "type": "integer", "format": "int64", "example": 400 }, "detail": { "type": "string", "example": "The request is invalid." } } } } } }, "401": { "description": "Unauthorized: Full authentication is required to access this resource" }, "500": { "description": "Unhadled error was generated" } } } }, "/api/v2/packages/{tracking}/charges-summary": { "get": { "tags": [ "Packages" ], "summary": "Get charges summary", "description": "Returns a summary of package charges if available.", "operationId": "getChargesSummary", "parameters": [ { "name": "tracking", "in": "path", "description": "Aeropost tracking number (Aerotrack)", "required": true, "schema": { "type": "string" }, "example": "MIA000039502012" }, { "name": "language", "in": "query", "description": "Possible values: es = Spanish, en = English", "required": false, "schema": { "type": "string", "default": "en", "enum": [ "en", "es" ] } } ], "responses": { "200": { "description": "Charges summary data", "content": { "application/json": { "schema": { "type": "object", "properties": { "credits": { "type": "array", "description": "Breakdown of credits applied", "items": { "type": "object", "properties": { "amount": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "description": { "type": "string", "description": "Charge description", "example": "International Freight" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "SJO44000013344901" }, "dateTime": { "type": "string", "description": "Date and time the charge was generated (Miami Time)", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isGovermentFee": { "type": "boolean", "description": "Represents whether the fee is collected by the government", "example": false } }, "description": "Breakdown of payments made" } }, "government": { "type": "array", "description": "Breakdown of charges collected by the government", "items": { "type": "object", "properties": { "amount": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "description": { "type": "string", "description": "Charge description", "example": "International Freight" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "SJO44000013344901" }, "dateTime": { "type": "string", "description": "Date and time the charge was generated (Miami Time)", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isGovermentFee": { "type": "boolean", "description": "Represents whether the fee is collected by the government", "example": false } }, "description": "Breakdown of payments made" } }, "ourServices": { "type": "array", "description": "Breakdown of charges collected by Aeropost", "items": { "type": "object", "properties": { "amount": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "description": { "type": "string", "description": "Charge description", "example": "International Freight" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "SJO44000013344901" }, "dateTime": { "type": "string", "description": "Date and time the charge was generated (Miami Time)", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isGovermentFee": { "type": "boolean", "description": "Represents whether the fee is collected by the government", "example": false } }, "description": "Breakdown of payments made" } }, "payments": { "type": "array", "description": "Breakdown of payments made", "items": { "type": "object", "properties": { "amount": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "description": { "type": "string", "description": "Charge description", "example": "International Freight" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "SJO44000013344901" }, "dateTime": { "type": "string", "description": "Date and time the charge was generated (Miami Time)", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isGovermentFee": { "type": "boolean", "description": "Represents whether the fee is collected by the government", "example": false } }, "description": "Breakdown of payments made" } }, "total": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "totalCredits": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "totalGovernment": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "totalOurServices": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "totalPayments": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } } } } } } }, "204": { "description": "Returns no content or null data, if charges are not available yet" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "entityName": { "type": "string", "example": "entityName" }, "errorKey": { "type": "string", "example": "errorKey" }, "errorList": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "example": "0000" }, "description": { "type": "string", "example": "Aerotrack parameter can't be null or empty" } } } }, "title": { "type": "string", "example": "Bad Request" }, "status": { "type": "integer", "format": "int64", "example": 400 }, "detail": { "type": "string", "example": "The request is invalid." } } } } } }, "401": { "description": "Unauthorized: Full authentication is required to access this resource" }, "500": { "description": "Unhadled error was generated" } } } }, "/api/couriers": { "get": { "tags": [ "Couriers" ], "summary": "Get courier companies", "description": "Get all valid courier companies.", "operationId": "getAllCouriers", "responses": { "200": { "description": "Returns all available courier companies", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "Courier id for Aeropost", "format": "int32", "example": 7, "default": 0 }, "name": { "type": "string", "description": "Courier company name", "example": "UPS", "default": "Other" }, "regex": { "type": "string", "description": "When get available courier companies, this regex can be used to match a tracking number with a courier company.", "example": "1Z\\d{16}" } } } } } } }, "401": { "description": "Unauthorized: Full authentication is required to access this resource" }, "500": { "description": "Unhadled error was generated" } } } }, "/api/consignees": { "get": { "tags": [ "Consignees" ], "summary": "Gets consignees", "description": "Gets all consignees from your account", "operationId": "getConsignees", "responses": { "200": { "description": "Returns consignees availables in your account", "content": { "application/json": { "schema": { "type": "array", "items": { "required": [ "email", "fullName" ], "type": "object", "properties": { "fullName": { "type": "string", "description": "Full name of the consignee", "example": "Aeropost Test" }, "email": { "type": "string", "description": "Email of the consignee", "example": "test@aeropost.com" }, "isOwner": { "type": "boolean", "description": "Represents whether consignee is the account owner.", "example": true }, "id": { "type": "integer", "description": "Consignee unique id", "format": "int64" } } } } } } }, "401": { "description": "Unauthorized: Full authentication is required to access this resource" }, "500": { "description": "Unhadled error was generated" } } } } }, "components": { "schemas": { "PreAlertFileRequestDTO": { "required": [ "data", "fileName" ], "type": "object", "properties": { "fileName": { "type": "string", "description": "File name with extension", "example": "invoice.pdf" }, "data": { "type": "string", "description": "Base64 File or URL. To upload a file, send a Base64 file; when you get attachments a URL will be returned" } }, "description": "Package invoices" }, "PreAlertRequestDTO": { "required": [ "consigneeId", "courierId", "courierTracking", "description", "storeName", "value" ], "type": "object", "properties": { "consigneeId": { "type": "integer", "description": "Consignee id. Do a GET request to /api/consignees to obtain available consignees in your account", "format": "int64", "example": 1234567 }, "courierId": { "type": "integer", "description": "Courier id. Do a GET request to /api/couriers to obtain available couriers", "format": "int32", "example": 7, "default": 0 }, "courierTracking": { "type": "string", "description": "Courier tracking number", "example": "1Z9999999999999999" }, "storeName": { "type": "string", "description": "Store name where the package was bought", "example": "AMAZON.COM" }, "value": { "type": "number", "description": "Value of the package", "format": "double", "example": 100.23 }, "description": { "type": "string", "description": "Description of the package", "example": "Shoes" }, "attachments": { "type": "array", "description": "Package invoices", "items": { "required": [ "data", "fileName" ], "type": "object", "properties": { "fileName": { "type": "string", "description": "File name with extension", "example": "invoice.pdf" }, "data": { "type": "string", "description": "Base64 File or URL. To upload a file, send a Base64 file; when you get attachments a URL will be returned" } }, "description": "Package invoices" } } }, "description": "PreAlert package data" }, "AlertExceptionSchema": { "type": "object", "properties": { "entityName": { "type": "string", "example": "entityName" }, "errorKey": { "type": "string", "example": "errorKey" }, "errorList": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "example": "0000" }, "description": { "type": "string", "example": "Aerotrack parameter can't be null or empty" } } } }, "title": { "type": "string", "example": "Bad Request" }, "status": { "type": "integer", "format": "int64", "example": 400 }, "detail": { "type": "string", "example": "The request is invalid." } } }, "BaseError": { "type": "object", "properties": { "code": { "type": "string", "example": "0000" }, "description": { "type": "string", "example": "Aerotrack parameter can't be null or empty" } } }, "PreAlertFileResponseDTO": { "required": [ "data", "fileName" ], "type": "object", "properties": { "fileName": { "type": "string", "description": "File name with extension", "example": "invoice.pdf" }, "data": { "type": "string", "description": "Base64 File or URL. To upload a file, send a Base64 file; when you get attachments a URL will be returned" }, "id": { "type": "integer", "description": "PreAlert invoice id", "format": "int32", "example": 12345 } }, "description": "Package invoices" }, "PreAlertResponseDTO": { "required": [ "consigneeId", "courierId", "courierTracking", "description", "storeName", "value" ], "type": "object", "properties": { "consigneeId": { "type": "integer", "description": "Consignee id. Do a GET request to /api/consignees to obtain available consignees in your account", "format": "int64", "example": 1234567 }, "courierId": { "type": "integer", "description": "Courier id. Do a GET request to /api/couriers to obtain available couriers", "format": "int32", "example": 7, "default": 0 }, "courierTracking": { "type": "string", "description": "Courier tracking number", "example": "1Z9999999999999999" }, "storeName": { "type": "string", "description": "Store name where the package was bought", "example": "AMAZON.COM" }, "value": { "type": "number", "description": "Value of the package", "format": "double", "example": 100.23 }, "description": { "type": "string", "description": "Description of the package", "example": "Shoes" }, "id": { "type": "integer", "description": "PreAlert identification", "format": "int32", "example": 1234567 }, "attachments": { "type": "array", "description": "Package invoices", "items": { "required": [ "data", "fileName" ], "type": "object", "properties": { "fileName": { "type": "string", "description": "File name with extension", "example": "invoice.pdf" }, "data": { "type": "string", "description": "Base64 File or URL. To upload a file, send a Base64 file; when you get attachments a URL will be returned" }, "id": { "type": "integer", "description": "PreAlert invoice id", "format": "int32", "example": 12345 } }, "description": "Package invoices" } } } }, "AttachmentPackageDTO": { "type": "object", "properties": { "category": { "type": "integer", "description": "Possible values: 0 = Unknow, 1 = Invoice, 2 = Other, 3 = PackagePicture, 4 = POD_Signature", "format": "int32", "example": 1, "enum": [ 0, 1, 2, 3, 4 ] }, "creationDate": { "type": "string", "description": "Creation date", "example": "2023-10-25T16:57:50.230+00:00" }, "description": { "type": "string", "description": "Attachment description", "example": "Invoice" }, "id": { "type": "integer", "description": "Attachment id", "format": "int32", "example": 8783215 }, "name": { "type": "string", "description": "Attachment file name with extension", "example": "Invoice(f1687).html" }, "url": { "type": "string", "description": "Download url", "example": "https://test.com/inoviceDowload?id=8783215" } }, "description": "List of attachments (invoices, photos, etc.)" }, "DimensionsDTO": { "type": "object", "properties": { "length": { "type": "number", "format": "double" }, "width": { "type": "number", "format": "double" }, "height": { "type": "number", "format": "double" } }, "description": "Package dimensions in inches if available" }, "PackageDTO": { "type": "object", "properties": { "statusCode": { "type": "string", "description": "Current status code", "example": "02" }, "aerotrack": { "type": "string", "description": "Aeropost tracking number", "example": "MIA000039502012" }, "store": { "type": "string", "description": "Store where package was bought", "example": "EBAY KEVIN MECA." }, "description": { "type": "string", "description": "Package description", "example": "FOLLETO" }, "statusName": { "type": "string", "description": "Current status name/description", "example": "Preparing for shipment" }, "consignee": { "type": "string", "description": "Consignee name", "example": "TEST ACCOUNT AA" }, "account": { "type": "integer", "description": "Account number", "format": "int32", "example": 9 }, "gateway": { "type": "string", "description": "Aeropost gateway code", "example": "SCL" }, "courierTracking": { "type": "string", "description": "Courier tracking number", "example": "TESTSCL9478347676456" }, "courierName": { "type": "string", "description": "Courier name", "example": "Aeropost" }, "date": { "type": "string", "description": "Date package was received or created", "format": "date-time", "example": "2023-10-25T16:57:24Z" }, "declaredValue": { "type": "number", "description": "Declared value", "format": "float", "example": 50.2 }, "weightKilos": { "type": "number", "description": "Weight in kilos", "format": "float", "example": 1.361 }, "weightPounds": { "type": "number", "description": "Weight in pounds", "format": "float", "example": 3.5 }, "totalCharges": { "type": "number", "description": "Total charges in USD if available", "format": "float", "example": 25.5 }, "totalChargesLocal": { "type": "number", "description": "Total charges in local currency if available", "format": "float", "example": 1500.25 }, "hasAnAlert": { "type": "boolean", "description": "True if package has an alert", "example": false }, "isThirdParty": { "type": "boolean", "description": "True if package is from a shipper", "example": false }, "isAccountFirstPackage": { "type": "boolean", "description": "True if package is the first package of the account", "example": false }, "speedType": { "type": "string", "description": "Speed type", "example": "Air" }, "speedTypeCode": { "type": "string", "description": "Speed type code", "example": "SP01" }, "hasWebInvoice": { "type": "boolean", "description": "True if package has a web invoice", "example": true }, "attachments": { "type": "array", "description": "List of attachments (invoices, photos, etc.)", "items": { "type": "object", "properties": { "category": { "type": "integer", "description": "Possible values: 0 = Unknow, 1 = Invoice, 2 = Other, 3 = PackagePicture, 4 = POD_Signature", "format": "int32", "example": 1, "enum": [ 0, 1, 2, 3, 4 ] }, "creationDate": { "type": "string", "description": "Creation date", "example": "2023-10-25T16:57:50.230+00:00" }, "description": { "type": "string", "description": "Attachment description", "example": "Invoice" }, "id": { "type": "integer", "description": "Attachment id", "format": "int32", "example": 8783215 }, "name": { "type": "string", "description": "Attachment file name with extension", "example": "Invoice(f1687).html" }, "url": { "type": "string", "description": "Download url", "example": "https://test.com/inoviceDowload?id=8783215" } }, "description": "List of attachments (invoices, photos, etc.)" } }, "consigneeEmail": { "type": "string", "description": "Consignee email", "example": "test@aeropost.com" }, "lastUpdate": { "type": "string", "description": "Last date and time the package was updated", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isPreAlerted": { "type": "boolean", "description": "True if package was pre-alert", "example": false }, "graphicStationId": { "type": "integer", "description": "It represents a global stage in which the package is currently located. It could contain these values:\r\n-1 = No stage\r\n 0 = In transit to miami\r\n 3 = In Miami\r\n 4 = In transit to country\r\n 5 = In country\r\n 6 = Out for delivery\r\n 7 = Ready for pickup\r\n 8 = Delivered", "format": "int32", "example": 3, "enum": [ -1, 0, 3, 4, 5, 6, 7, 8 ] }, "cifvalue": { "type": "number", "description": "Value that was declared to customs. CIF = Cost, Insurance and Freight", "format": "float", "example": 30.5 }, "cifvalueLocal": { "type": "number", "description": "Value that was declared to customs returned in local currency (The local currency will be calculated with the exchange rate of the day). CIF = Cost, Insurance and Freight", "format": "float", "example": 6921.12 }, "customsTicket": { "type": "string", "description": "Customs ticket number, if available. It refers to DUA number, OEA number, etc.", "example": "3404703132" }, "dimensionsInches": { "type": "object", "properties": { "length": { "type": "number", "format": "double" }, "width": { "type": "number", "format": "double" }, "height": { "type": "number", "format": "double" } }, "description": "Package dimensions in inches if available" }, "volumetricWeight": { "type": "number", "description": "Volumetric weight in cubic feet if available", "format": "float" } } }, "PackagesFilterReponseDTO": { "type": "object", "properties": { "packages": { "type": "array", "description": "List of packages that match the provided filters", "items": { "type": "object", "properties": { "statusCode": { "type": "string", "description": "Current status code", "example": "02" }, "aerotrack": { "type": "string", "description": "Aeropost tracking number", "example": "MIA000039502012" }, "store": { "type": "string", "description": "Store where package was bought", "example": "EBAY KEVIN MECA." }, "description": { "type": "string", "description": "Package description", "example": "FOLLETO" }, "statusName": { "type": "string", "description": "Current status name/description", "example": "Preparing for shipment" }, "consignee": { "type": "string", "description": "Consignee name", "example": "TEST ACCOUNT AA" }, "account": { "type": "integer", "description": "Account number", "format": "int32", "example": 9 }, "gateway": { "type": "string", "description": "Aeropost gateway code", "example": "SCL" }, "courierTracking": { "type": "string", "description": "Courier tracking number", "example": "TESTSCL9478347676456" }, "courierName": { "type": "string", "description": "Courier name", "example": "Aeropost" }, "date": { "type": "string", "description": "Date package was received or created", "format": "date-time", "example": "2023-10-25T16:57:24Z" }, "declaredValue": { "type": "number", "description": "Declared value", "format": "float", "example": 50.2 }, "weightKilos": { "type": "number", "description": "Weight in kilos", "format": "float", "example": 1.361 }, "weightPounds": { "type": "number", "description": "Weight in pounds", "format": "float", "example": 3.5 }, "totalCharges": { "type": "number", "description": "Total charges in USD if available", "format": "float", "example": 25.5 }, "totalChargesLocal": { "type": "number", "description": "Total charges in local currency if available", "format": "float", "example": 1500.25 }, "hasAnAlert": { "type": "boolean", "description": "True if package has an alert", "example": false }, "isThirdParty": { "type": "boolean", "description": "True if package is from a shipper", "example": false }, "isAccountFirstPackage": { "type": "boolean", "description": "True if package is the first package of the account", "example": false }, "speedType": { "type": "string", "description": "Speed type", "example": "Air" }, "speedTypeCode": { "type": "string", "description": "Speed type code", "example": "SP01" }, "hasWebInvoice": { "type": "boolean", "description": "True if package has a web invoice", "example": true }, "attachments": { "type": "array", "description": "List of attachments (invoices, photos, etc.)", "items": { "type": "object", "properties": { "category": { "type": "integer", "description": "Possible values: 0 = Unknow, 1 = Invoice, 2 = Other, 3 = PackagePicture, 4 = POD_Signature", "format": "int32", "example": 1, "enum": [ 0, 1, 2, 3, 4 ] }, "creationDate": { "type": "string", "description": "Creation date", "example": "2023-10-25T16:57:50.230+00:00" }, "description": { "type": "string", "description": "Attachment description", "example": "Invoice" }, "id": { "type": "integer", "description": "Attachment id", "format": "int32", "example": 8783215 }, "name": { "type": "string", "description": "Attachment file name with extension", "example": "Invoice(f1687).html" }, "url": { "type": "string", "description": "Download url", "example": "https://test.com/inoviceDowload?id=8783215" } }, "description": "List of attachments (invoices, photos, etc.)" } }, "consigneeEmail": { "type": "string", "description": "Consignee email", "example": "test@aeropost.com" }, "lastUpdate": { "type": "string", "description": "Last date and time the package was updated", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isPreAlerted": { "type": "boolean", "description": "True if package was pre-alert", "example": false }, "graphicStationId": { "type": "integer", "description": "It represents a global stage in which the package is currently located. It could contain these values:\r\n-1 = No stage\r\n 0 = In transit to miami\r\n 3 = In Miami\r\n 4 = In transit to country\r\n 5 = In country\r\n 6 = Out for delivery\r\n 7 = Ready for pickup\r\n 8 = Delivered", "format": "int32", "example": 3, "enum": [ -1, 0, 3, 4, 5, 6, 7, 8 ] }, "cifvalue": { "type": "number", "description": "Value that was declared to customs. CIF = Cost, Insurance and Freight", "format": "float", "example": 30.5 }, "cifvalueLocal": { "type": "number", "description": "Value that was declared to customs returned in local currency (The local currency will be calculated with the exchange rate of the day). CIF = Cost, Insurance and Freight", "format": "float", "example": 6921.12 }, "customsTicket": { "type": "string", "description": "Customs ticket number, if available. It refers to DUA number, OEA number, etc.", "example": "3404703132" }, "dimensionsInches": { "type": "object", "properties": { "length": { "type": "number", "format": "double" }, "width": { "type": "number", "format": "double" }, "height": { "type": "number", "format": "double" } }, "description": "Package dimensions in inches if available" }, "volumetricWeight": { "type": "number", "description": "Volumetric weight in cubic feet if available", "format": "float" } } } }, "totalItems": { "type": "integer", "description": "Total number of packages that match the provided filters", "format": "int32", "example": 210 } } }, "StatusDTO": { "type": "object", "properties": { "description": { "type": "string", "description": "Status description", "example": "Received in Aeropost Miami" }, "statusCodes": { "type": "array", "description": "List of status codes that current status can have", "example": [ "01", "34" ], "items": { "type": "string", "description": "List of status codes that current status can have", "example": "[\"01\",\"34\"]" } } }, "description": "Status information" }, "StatusHistoryDTO": { "type": "object", "properties": { "date": { "type": "string", "description": "Date and time the status was generated (Miami Time)", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "gateway": { "type": "string", "description": "Gateway where the status was generated", "example": "MIA" }, "status": { "type": "object", "properties": { "description": { "type": "string", "description": "Status description", "example": "Received in Aeropost Miami" }, "statusCodes": { "type": "array", "description": "List of status codes that current status can have", "example": [ "01", "34" ], "items": { "type": "string", "description": "List of status codes that current status can have", "example": "[\"01\",\"34\"]" } } }, "description": "Status information" }, "gatewayDescription": { "type": "string", "description": "Gateway name", "example": "Miami, Florida" }, "comments": { "type": "array", "items": { "type": "string" } } } }, "AmountDTO": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "ChargeDTO": { "type": "object", "properties": { "amount": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "description": { "type": "string", "description": "Charge description", "example": "International Freight" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "SJO44000013344901" }, "dateTime": { "type": "string", "description": "Date and time the charge was generated (Miami Time)", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isGovermentFee": { "type": "boolean", "description": "Represents whether the fee is collected by the government", "example": false } }, "description": "Breakdown of payments made" }, "ChargesSummaryDTO": { "type": "object", "properties": { "credits": { "type": "array", "description": "Breakdown of credits applied", "items": { "type": "object", "properties": { "amount": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "description": { "type": "string", "description": "Charge description", "example": "International Freight" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "SJO44000013344901" }, "dateTime": { "type": "string", "description": "Date and time the charge was generated (Miami Time)", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isGovermentFee": { "type": "boolean", "description": "Represents whether the fee is collected by the government", "example": false } }, "description": "Breakdown of payments made" } }, "government": { "type": "array", "description": "Breakdown of charges collected by the government", "items": { "type": "object", "properties": { "amount": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "description": { "type": "string", "description": "Charge description", "example": "International Freight" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "SJO44000013344901" }, "dateTime": { "type": "string", "description": "Date and time the charge was generated (Miami Time)", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isGovermentFee": { "type": "boolean", "description": "Represents whether the fee is collected by the government", "example": false } }, "description": "Breakdown of payments made" } }, "ourServices": { "type": "array", "description": "Breakdown of charges collected by Aeropost", "items": { "type": "object", "properties": { "amount": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "description": { "type": "string", "description": "Charge description", "example": "International Freight" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "SJO44000013344901" }, "dateTime": { "type": "string", "description": "Date and time the charge was generated (Miami Time)", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isGovermentFee": { "type": "boolean", "description": "Represents whether the fee is collected by the government", "example": false } }, "description": "Breakdown of payments made" } }, "payments": { "type": "array", "description": "Breakdown of payments made", "items": { "type": "object", "properties": { "amount": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "description": { "type": "string", "description": "Charge description", "example": "International Freight" }, "invoiceNumber": { "type": "string", "description": "Invoice number", "example": "SJO44000013344901" }, "dateTime": { "type": "string", "description": "Date and time the charge was generated (Miami Time)", "format": "date-time", "example": "2023-10-25T16:57:50.23Z" }, "isGovermentFee": { "type": "boolean", "description": "Represents whether the fee is collected by the government", "example": false } }, "description": "Breakdown of payments made" } }, "total": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "totalCredits": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "totalGovernment": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "totalOurServices": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } }, "totalPayments": { "type": "object", "properties": { "usd": { "type": "number", "description": "Amount in USD currency", "format": "double", "example": 1.9 }, "local": { "type": "number", "description": "Amount in local currency if available", "format": "double", "example": 1017.26 } } } } }, "AttachFileDTO": { "required": [ "data", "documentType", "fileName", "tracking" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "tracking": { "type": "string", "description": "Aerotrack or courier tracking number", "example": "1Z9999999999999999" }, "fileName": { "type": "string", "description": "File name", "example": "invoice.pdf" }, "documentType": { "type": "integer", "description": "Possible values: 0 = Unknow, 1 = Invoice, 2 = Other, 3 = PackagePicture, 4 = POD_Signature", "format": "int32", "default": 1, "enum": [ 0, 1, 2, 3, 4 ] }, "data": { "type": "string", "description": "Base64 File or URL. To upload a file, send a Base64 file; when you get attachments a URL will be returned" } }, "description": "Package files (Invoices, pictures, etc)" }, "ConsigneeDTO": { "required": [ "email", "fullName" ], "type": "object", "properties": { "fullName": { "type": "string", "description": "Full name of the consignee", "example": "Aeropost Test" }, "email": { "type": "string", "description": "Email of the consignee", "example": "test@aeropost.com" }, "isOwner": { "type": "boolean", "description": "Represents whether consignee is the account owner.", "example": true }, "id": { "type": "integer", "description": "Consignee unique id", "format": "int64" } } }, "CourierDTO": { "type": "object", "properties": { "id": { "type": "integer", "description": "Courier id for Aeropost", "format": "int32", "example": 7, "default": 0 }, "name": { "type": "string", "description": "Courier company name", "example": "UPS", "default": "Other" }, "regex": { "type": "string", "description": "When get available courier companies, this regex can be used to match a tracking number with a courier company.", "example": "1Z\\d{16}" } } }, "PackageInformationDTO": { "required": [ "courier", "courierTracking", "description", "value" ], "type": "object", "properties": { "courier": { "type": "object", "properties": { "id": { "type": "integer", "description": "Courier id for Aeropost", "format": "int32", "example": 7, "default": 0 }, "name": { "type": "string", "description": "Courier company name", "example": "UPS", "default": "Other" }, "regex": { "type": "string", "description": "When get available courier companies, this regex can be used to match a tracking number with a courier company.", "example": "1Z\\d{16}" } } }, "value": { "type": "number", "description": "Value of the package", "format": "double", "example": 100.23 }, "description": { "type": "string", "description": "Description of the package", "example": "Shoes" }, "courierTracking": { "type": "string", "description": "Courier tracking number", "example": "1Z9999999999999999" } }, "description": "Package information" }, "PreAlertDTO": { "required": [ "consignee", "language", "packageInformation", "storeName" ], "type": "object", "properties": { "id": { "type": "integer", "description": "Unique PreAlert identification (Only required for /api/preAlert/update)", "format": "int32", "default": 0 }, "consignee": { "required": [ "email", "fullName" ], "type": "object", "properties": { "fullName": { "type": "string", "description": "Full name of the consignee", "example": "Aeropost Test" }, "email": { "type": "string", "description": "Email of the consignee", "example": "test@aeropost.com" }, "isOwner": { "type": "boolean", "description": "Represents whether consignee is the account owner.", "example": true }, "id": { "type": "integer", "description": "Consignee unique id", "format": "int64" } } }, "storeName": { "type": "string", "description": "Store name where the package was bought", "example": "AMAZON.COM" }, "packageInformation": { "required": [ "courier", "courierTracking", "description", "value" ], "type": "object", "properties": { "courier": { "type": "object", "properties": { "id": { "type": "integer", "description": "Courier id for Aeropost", "format": "int32", "example": 7, "default": 0 }, "name": { "type": "string", "description": "Courier company name", "example": "UPS", "default": "Other" }, "regex": { "type": "string", "description": "When get available courier companies, this regex can be used to match a tracking number with a courier company.", "example": "1Z\\d{16}" } } }, "value": { "type": "number", "description": "Value of the package", "format": "double", "example": 100.23 }, "description": { "type": "string", "description": "Description of the package", "example": "Shoes" }, "courierTracking": { "type": "string", "description": "Courier tracking number", "example": "1Z9999999999999999" } }, "description": "Package information" }, "attachedInvoices": { "type": "array", "description": "Package files (Invoices, pictures, etc)", "items": { "required": [ "data", "documentType", "fileName", "tracking" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "tracking": { "type": "string", "description": "Aerotrack or courier tracking number", "example": "1Z9999999999999999" }, "fileName": { "type": "string", "description": "File name", "example": "invoice.pdf" }, "documentType": { "type": "integer", "description": "Possible values: 0 = Unknow, 1 = Invoice, 2 = Other, 3 = PackagePicture, 4 = POD_Signature", "format": "int32", "default": 1, "enum": [ 0, 1, 2, 3, 4 ] }, "data": { "type": "string", "description": "Base64 File or URL. To upload a file, send a Base64 file; when you get attachments a URL will be returned" } }, "description": "Package files (Invoices, pictures, etc)" } }, "language": { "type": "string", "description": "Possible values: es = Spanish, en = English", "default": "en", "enum": [ "es", "en" ] } } } }, "securitySchemes": { "security_auth_pkce": { "type": "oauth2", "description": "Client Id: [[Provided by aeropost]].
Client Secret: [[Provided by aeropost]]", "flows": { "authorizationCode": { "authorizationUrl": "https://ap-idp-dev-stage.aeropost.com/auth/realms/myaccount/protocol/openid-connect/auth", "tokenUrl": "https://ap-idp-dev-stage.aeropost.com/auth/realms/myaccount/protocol/openid-connect/token", "scopes": {} } } }, "security_auth_password": { "type": "oauth2", "description": "Client Id: [[Provided by aeropost]].
Client Secret: [[Provided by aeropost]]", "flows": { "password": { "tokenUrl": "https://ap-idp-dev-stage.aeropost.com/auth/realms/myaccount/protocol/openid-connect/token", "scopes": {} } } } } } }