# Create and update a Manifest Create a [manifest](/key-concepts#manifest) in Zimark based on WMS data, then keep it in sync as [pallets](/key-concepts#pallet) change. This is the most common integration a warehouse builds: when an order is ready to be shipped, mirror its pallets into a Zimark manifest so they can be verified at the gate during loading. If you want the *why* behind when to trigger each call, see the [Realtime Manifest Creation](/use-cases/realtime-manifest-creation) use case. This guide is the *how*. ## Prerequisites - An API key (`ZIM.…`). See [Authentication](/rest-api/authentication). - A unique number from the WMS to identify the manifest, e.g., an order number. - Your pallet IDs from the WMS. Throughout this guide, the manifest's external ID is your **WMS order ID** (for example `MAN-2024-001`), and each asset is a **pallet's WMS ID** (for example `LPN00012345`). ## Step 1: Create the manifest When the order reaches *fully allocated* or *picked* in your WMS, create the manifest with its allocated pallets. [`POST /integration/rest/api/v1/manifest`](/api#operation/createManifest) cURL ```bash curl -X POST "https://api.zimark.link/integration/rest/api/v1/manifest" \ -H "X-AUTH-KEY: ZIM.your-api-key-here" \ -H "Content-Type: application/json" \ -d '{ "identifier": "MAN-2024-001", "assets": ["LPN00012345", "LPN00012346"] }' ``` JavaScript ```javascript const response = await fetch( 'https://api.zimark.link/integration/rest/api/v1/manifest', { method: 'POST', headers: { 'X-AUTH-KEY': 'ZIM.your-api-key-here', 'Content-Type': 'application/json' }, body: JSON.stringify({ identifier: 'MAN-2024-001', assets: ['LPN00012345', 'LPN00012346'] }) } ); console.log(await response.json()); ``` Python ```python import requests response = requests.post( 'https://api.zimark.link/integration/rest/api/v1/manifest', headers={ 'X-AUTH-KEY': 'ZIM.your-api-key-here', 'Content-Type': 'application/json' }, json={ 'identifier': 'MAN-2024-001', 'assets': ['LPN00012345', 'LPN00012346'] } ) print(response.json()) ``` ### Request fields | Field | Type | Required | Notes | | --- | --- | --- | --- | | `identifier` | string | Yes | The manifest's external ID, usually your WMS order ID. Must be a **string**, not a number. | | `assets` | string array | Yes | At least one pallet's WMS ID. | ### Success response `200 OK` returns the manifest's internal UUID: ```json { "uuid": "6a7132c4-a035-4602-a1af-baa0b5569e17" } ``` Store nothing from this response if you don't need to. You address the manifest by the `identifier` you chose. The UUID is Zimark's internal handle. ## Step 2: Update the manifest when pallets change During picking, operators sometimes add, remove, or swap pallets (a pallet is damaged and replaced by another with the same SKU / the load is too heavy for a truck and some pallets need to be removed). Send the **complete updated asset list**. The update is *declarative*, so Zimark adds, removes, and keeps assets to match what you send. You do not send a diff. [`PUT /integration/rest/api/v1/manifest/{manifestExternalId}`](/api#operation/updateManifest) cURL ```bash curl -X PUT "https://api.zimark.link/integration/rest/api/v1/manifest/MAN-2024-001" \ -H "X-AUTH-KEY: ZIM.your-api-key-here" \ -H "Content-Type: application/json" \ -d '{ "assets": ["LPN00012345", "LPN00099999"] }' ``` JavaScript ```javascript const response = await fetch( 'https://api.zimark.link/integration/rest/api/v1/manifest/MAN-2024-001', { method: 'PUT', headers: { 'X-AUTH-KEY': 'ZIM.your-api-key-here', 'Content-Type': 'application/json' }, body: JSON.stringify({ assets: ['LPN00012345', 'LPN00099999'] }) } ); console.log(response.status); ``` Python ```python import requests response = requests.put( 'https://api.zimark.link/integration/rest/api/v1/manifest/MAN-2024-001', headers={ 'X-AUTH-KEY': 'ZIM.your-api-key-here', 'Content-Type': 'application/json' }, json={'assets': ['LPN00012345', 'LPN00099999']} ) print(response.status_code) ``` In the example above `LPN00012346` was dropped and `LPN00099999` added; `LPN00012345` stays. The response is `200 OK`. ## Confirm it worked Fetch the manifest's pallets to confirm the current list matches what you sent. You address the manifest by the `identifier` you chose. [`GET /integration/rest/api/v1/manifest/{manifestExternalId}/asset`](/api#operation/getManifestAssets) cURL ```bash curl -X GET "https://api.zimark.link/integration/rest/api/v1/manifest/MAN-2024-001/asset" \ -H "X-AUTH-KEY: ZIM.your-api-key-here" ``` JavaScript ```javascript const response = await fetch( 'https://api.zimark.link/integration/rest/api/v1/manifest/MAN-2024-001/asset', { headers: { 'X-AUTH-KEY': 'ZIM.your-api-key-here' } } ); console.log(await response.json()); ``` Python ```python import requests response = requests.get( 'https://api.zimark.link/integration/rest/api/v1/manifest/MAN-2024-001/asset', headers={'X-AUTH-KEY': 'ZIM.your-api-key-here'} ) print(response.json()) ``` The response lists one entry per pallet on the manifest. `trackIdentifier` is the pallet's WMS ID, and `loadingStatus` shows where it is in the loading workflow (`NOT_LOADED` for a freshly created manifest): ```json [ { "trackIdentifier": "LPN00012345", "loadingStatus": "NOT_LOADED" }, { "trackIdentifier": "LPN00099999", "loadingStatus": "NOT_LOADED" } ] ``` The pallet IDs returned here should match the list from your most recent create or update call. If a call fails, check [Troubleshooting](/rest-api/troubleshoot). The most common causes are a missing/invalid `X-AUTH-KEY` or sending `identifier` as a number instead of a string. ## Related - [Realtime Manifest Creation](/use-cases/realtime-manifest-creation): when to trigger each call across the order lifecycle. - [Coupling API](/zimarkers/coupling-api): how pallets become camera-verifiable by carrying a Zimarker. - [Manifest webhooks](/webhooks/webhooks-manifest): receive events as the manifest and its assets change.