Skip to main content

Update Lead Time Group

Add new Lead Time group.

URL : /api/shipping-manage/leadtime_group/{id}

Method : PATCH

Validate Rule

'id' => ['required', 'string', 'exists:leadtime_groups,id'],
'name' => ['nullable', 'string'],
'status' => ['nullable', 'int'],
'updated_at' => ['required', 'date'], // current updated_at value of entity

Input

{
"name": "Default 2",
"status": 0,
"updated_at": "2024-03-06T09:43:05.000000Z"
}

Success Response

Code : 200 OK

Content example

{
"success": true,
"error": null,
"errorCode": null,
"data": {
"id": 1,
"code": "default",
"name": "Default 2",
"status": 0,
"created_at": "2024-03-06T09:31:39.000000Z",
"updated_at": "2024-03-06T09:46:05.000000Z",
"deleted_at": null
}
}

cURL

curl --location --request PATCH 'https://api-gateway.develop.pharmacity.io/pmc-ecm-delivery-api/api/shipping-manage/leadtime_group/1?=' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxx' \
--data '{
"name": "Default 2",
"status": 0,
"updated_at": "2024-03-06T09:43:05.000000Z"
}'