PUT /batches/{id}

Updates Batch details which are in DRAFT status.

Only batches with statusCode DRAFT can be updated. If updating externalId, then the value must be unique.

Request

Ensure the bearer token is included in the Header of the PUT operation:

Header
Mandatory
Description

Authorization

Yes

Bearer token from /authentication/getToken

Parameter
Mandatory
Description

id

Yes

The Batch ID to update

The operation will also require the body to be supplied with the fields specified that require updates:

{
  "name": "string",
  "externalId": "string"
}
Body Field
Mandatory
Description

name

No

Change the friendly name of the Batch

externalId

No

Change the external batch identifier for the batch. If supplied, the external ID across all batches must be unique.

Response

If successful, the operation will return a Batch response:

{
  "id": "string($guid)",
  "name": "string",
  "externalId": "string",
  "statusCode": "string",
  "createdAt": "string($date-time)"
}
Field
Response Type
Description

id

string($guid)

Unique ID for the Batch that was updated.

name

string

Name of the batch that may have been updated.

externalId

string

External ID of the batch that may have been updated.

statusCode

string

Status of the Batch.

createdAt

string($date-time)

Date and time when the Batch was created.

Sample Response
{
  "id": "b7ccbefd-51e1-4720-81fb-da5700e34e81",
  "name": "Test Batch 1 updated",
  "externalId": "testbatch1up",
  "statusCode": "DRAFT",
  "createdAt": "2022-12-13T12:29:39.6332995Z"
}

Last updated