Create order issue

Got this error of create new order

{
“errors”: [
{
“message”: “Unexpected Error”,
“operation”: “order_create”,
“field”: “order_create”,
“request_id”: “5dba548a15699c49d87a843b”,
“code”: 22
}
],
“data”: {
“order_create”: null
}
}

Please clarify the error code
i dont understand what was the problem

Looks like you are sending warehouse_id:"" in that case, just ignore the warehouse_id or send null.
We are about to release an update that will include a better error handling in those cases.

1 Like

Now i am getting this error

{
“errors”: [
{
“message”: “Cannot access the requested resource. Permission denied”,
“operation”: “order_create”,
“field”: “order_create”,
“request_id”: “5dbb252da017a561c1f66c35”,
“code”: 7
}
],
“data”: {
“order_create”: null
}
}

Looks like you are sending customer_account_id but thats your own account_id. That field is supposed to be used only when you are a 3PL and you are creating resources (orders, pos, etc) for one of you customers. In your case, you should just skip that field.

thank seba,

but before today its was worked fine .

so there have any changes in shiphero API if yes please let me know

again got same error

:{“errors”:[{“message”:“Unexpected Error”,“operation”:“order_create”,“field”:“order_create”,“request_id”:“5dbb4edc3249280b155be01b”,“code”:22}],“data”:{“order_create”:null}}

@Daniel could you please try again and let me know if it works? (and also make sure to avoid including customer_account_id since you are not a 3pl.)

Sorry for the inconvenience.

thanks seba.

now it is working

one more query, if i am not including customer account id order not attached with the particulate customer and created order not listed to customer order list, so i am passing customer account id in create order query then order listed to the customer order list

@Daniel not sure I’m following, but customer_account_id refers to 3PL customers. So that’s not applicable to you since you are not a 3PL. Every order created should be available in the orders query since they will all be associated to your account.

Thanks seba
Please let me know the order date format

@Daniel dates are always YYYY-mm-dd