Skip to main content

Organization, e-shop, warehouse and more

Guide to Mailship's API for managing e-commerce operations, including organization, e-shop, warehouse, and WMS information retrieval.

Updated over a year ago

The Mailship API provides a robust set of endpoints for managing various aspects of your e-commerce operations. This article will guide you through some of the basic API calls you can make to obtain information about your organization, e-shop, warehouse, and WMS (physical warehouse).


Organization Information


To retrieve information about your organization, you can use the /api/organisation/list endpoint. This is a POST request that requires an empty body.


Here is an example of how to make this API call using curl:

curl -X POST http://app.mailship.eu/api/organisation/list

The response from this API call will be a JSON object containing a list of all organizations. Each organization is represented as a dictionary with various fields. Here's an example of what a single organization's data might look like:

{
"id": "fa3124a7-109c-4a27-9620-0918704c2bc0",
"name": "0Mailstep",
"registrationNumber": "0668777",
"vatNumber": "CZCZCZ0668777",
"addressLine1": "Do Čertous 10",
"addressLine2": "193 00 Praha",
"addressLine3": "Czech Republic",
"primaryCountry": "CZ",
"owner": "ba7c767b-ee3f-4303-9f61-f54ba5378a85",
"owners": [
"ba7c767b-ee3f-4303-9f61-f54ba5378a85"
],
"active": true,
"createdAt": "2021-03-10T13:39:18+01:00",
"wmses": [
"a56cb3a9-1676-4cfa-9559-7cce5bd45cba",
"da729281-0cf0-4555-9ab9-bc60cfdb7de4"
],
"suppliers": [
"c255e406-356a-4b51-a2bd-76fc59d4c96e"
],
"code": null,
"automaticExchangeEnabled": false,
"ignoreAddressValidation": false,
"stockAdviceCloseInterval": null,
"changedAt": "2023-06-28T15:36:48+02:00"
}

Each field in the dictionary represents a piece of information about the organization:

  • id: The unique identifier for the organization.

  • name: The name of the organization.

  • registrationNumber: The organization's registration number.

  • vatNumber: The organization's VAT number.

  • addressLine1, addressLine2, addressLine3: The organization's address, split into three lines.

  • primaryCountry: The primary country of the organization.

  • owner and owners: The owner(s) of the organization.

  • active: Whether the organization is active.

  • createdAt: The date and time when the organization was created.

  • wmses: The WMS (physical warehouse) associated with the organization.

  • suppliers: The suppliers associated with the organization.

  • code: The organization's code.

  • automaticExchangeEnabled: Whether automatic exchange is enabled for the organization.

  • ignoreAddressValidation: Whether address validation is ignored for the organization.

  • stockAdviceCloseInterval: The stock advice close interval for the organization.

  • changedAt: The date and time when theorganization's information was last updated.

One of the most important pieces of information you'll receive from this API call is the id field, which is the unique identifier (UUID) for your organization. This UUID is crucial for all future API calls you make, as it is used to identify your organization in the system.

For example, when creating a product, starting an expedition, or performing any other operation that is specific to your organization, you will need to provide this UUID in your API call. Therefore, it is recommended that you save this UUID in a secure and accessible location for future use.

Eshop Information

To retrieve information about your e-shop, you can use the /api/eshop/list endpoint. This is a POST request that requires an empty body.


Here is an example of how to make this API call using curl:

curl -X POST https://app.mailship.eu/api/eshop/list

The response from this API call will be a JSON object containing a list of all e-shops. Each e-shop is represented as a dictionary with various fields. Here's an example of what a single e-shop's data might look like:

{
"id": "7da51d76-87a4-4002-8a8e-5bb301b157e8",
"name": "TestMil.com",
"organisation": "7486b47f-2bf9-4cd9-9efe-1494c9870ce6",
"defaultWarehouse": null,
"warehouses": [
"21712ce0-c19a-4651-9354-3670e16507e6",
"a1d8cdcf-50b8-41d8-b560-2bf12b1ed1d2"
],
"active": true,
"createdAt": "2023-02-09T10:26:54+01:00",
"partners": null,
"salesChannelId": null,
"waitBeforeProcessing": false,
"editBeforeProcessing": false,
"integrationType": null,
"changedAt": "2023-04-28T10:45:05+02:00"
}

Each field in the dictionary represents a piece of information about the e-shop:

  • id: The unique identifier (UUID) for the e-shop.

  • name: The name of the e-shop.

  • organisation: The UUID of the organization that the e-shop belongs to.

  • defaultWarehouse: The UUID of the default warehouse for the e-shop.

  • warehouses: A list of UUIDs for the warehouses associated with the e-shop.

  • active: Whether the e-shop is active.

  • createdAt: The date and time when the e-shop was created.

  • partners: The partners associated with the e-shop.

  • salesChannelId: The sales channel ID for the e-shop.

  • waitBeforeProcessing: Whether the expeditions waits for confirmation before processing.

  • integrationType: The type of integration for the e-shop.

  • changedAt: The date and time when the e-shop's information was last updated.

One of the most important pieces of information you'll receive from this API call is the id field, which is the unique identifier (UUID) for your e-shop. This UUID is crucial for all future API calls you make, as it is used to identify your e-shop in the system.


For example, when creating an expedition or performing any other operation that is specific to your e-shop, you will need to provide this UUID in your API call. Therefore, it is recommended that you save this UUID in a secure and accessible location for future use.

Warehouse Information

To retrieve information about your virtual warehouse, you can use the /api/warehouse/list endpoint. This is a POST request that requires an empty body.

Here is an example of how to make this API call using curl:

curl -X POST http://app.mailship.eu/api/warehouse/list


The response from this API call will be a JSON object containing a list of all warehouses. Each warehouse is represented as a dictionary with various fields. Here's an example of what a single warehouse's data might look like:

{
"id": "b393543c-cbcc-4a8b-aa68-9a77cd85e660",
"name": "test-31-01",
"customId": "test",
"wmses": [
"e7f7935e-2937-44fe-8580-f11c50ba52bf"
],
"defaultWms": null,
"createdAt": "2023-01-31T15:49:31+01:00",
"organisation": "0e4fe88a-db24-4e07-bc01-0128b7002bda",
"changedAt": "2023-01-31T15:50:07+01:00"
}

Each field in the dictionary represents a piece of information about the warehouse:

  • id: The unique identifier (UUID) for the warehouse.

  • name: The name of the warehouse.

  • customId: The custom ID of the warehouse.

  • wmses: A list of UUIDs for the Warehouse Management Systems (WMS) associated with the warehouse.

  • defaultWms: The UUID of the default WMS for the warehouse.

  • createdAt: The date and time when the warehouse was created.

  • organisation: The UUID of the organization that the warehouse belongs to.

  • changedAt: The date and time when the warehouse's information was last updated.

One of the most important pieces of information you'll receive from this API call is the id field, which is the unique identifier (UUID) for your warehouse. This UUID is crucial for all future API calls you make, as it is used to identify your warehouse in the system.

WMS Information

To retrieve information about your WMS, you can use the /api/wms/list endpoint. This is a POST request that requires an empty body.


Here is an example of how to make this API call using curl:

curl -X POST http://app.mailship.eu/api/wms/list


The response from this API call will be a JSON object containing a list of all WMS. Each WMS is represented as a dictionary with various fields. Here's an example of what a single WMS's data might look like:

{
"id": "374dea7f-0054-45cd-9dbb-b93233239984",
"name": "2nd choice FW",
"organisation": "c0371871-4fac-4ca7-8262-431797d962aa",
"distributionCenter": "15604aab-a966-414d-bef4-330afdc48325",
"storeKey": "2ndchoiceFW hlavni",
"internalId": "c0e65199-d14c-494c-9904-5d9a2724b5b2",
"createdAt": "2021-10-13T17:06:24+02:00",
"warehouses": [
"2e2c1f22-7f3d-4c30-b9c3-2b8c8fcda046",
"f35962d8-6661-4488-8eab-df297acdf0eb"
],
"changedAt": "2023-01-14T16:46:59+01:00"
}

Each field in the dictionary represents a piece of information about the WMS:

  • id: The unique identifier (UUID) for the WMS.

  • name: The name of the WMS.

  • organisation: The UUID of the organization that the WMS belongs to.

  • distributionCenter: The UUID of the distribution center associated with the WMS.

  • storeKey: The store key of the WMS.

  • internalId: The internal ID of the WMS.

  • createdAt: The date and time when the WMS was created.

  • warehouses: A list of UUIDs for the virtual warehouses associated with the WMS.

  • changedAt: The date and time when the WMS's information was last updated.

One of the most important pieces of information you'll receive from this API call is the id field, which is the unique identifier (UUID) for your WMS. This UUID is crucial for all future API calls you make, as it is used to identify your WMS in the system.


Did this answer your question?