Skip to main content

Copy item

Copy a item only.

URL : /api/shipping-manage/leadtime_group_item/copy_item

Method : POST

Validate Rule

'id' => ['required', 'exists:leadtime_group_items,id'],
'weekdays' => ['required', 'array'],
'weekdays.*' => ['required', 'string'],

Enum

Mon,Tue,Wed,Thu,Fri,Sat,Sun

Input

{
"id": 3,
"weekdays": [
"Sun"
]
}

Success Response

Code : 200 OK

Content example

{
"success": true,
"error": null,
"errorCode": null,
"data": true
}

Error Response

Code : 400 BAD REQUEST

Content :

{
"success": false,
"error": "TUE data time overlap",
"errorCode": 400,
"data": {
"errors": [
"TUE data time overlap"
]
}
}

cURL

curl --location 'https://api-gateway.develop.pharmacity.io/pmc-ecm-delivery-api/api/shipping-manage/leadtime_group_item/copy_item' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxx' \
--data '{
"id": 3,
"weekdays": [
"Sun"
]
}'