# Order API: Create Order - auto\_apply\_taxes - Intermittent 500 and 504 errors

**URL:** <https://developer.squareup.com/forums/t/order-api-create-order-auto-apply-taxes-intermittent-500-and-504-errors/2952>\
**Category:** Questions\
**Tags:** orders-api, sandbox\
**Created:** [July 2, 2021, 2:12pm UTC](https://developer.squareup.com/forums/t/order-api-create-order-auto-apply-taxes-intermittent-500-and-504-errors/2952 "2021-07-02T14:12:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![malt](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@malt](https://developer.squareup.com/forums/u/malt)\
**Post date:** [July 2, 2021, 2:12pm UTC](https://developer.squareup.com/forums/t/order-api-create-order-auto-apply-taxes-intermittent-500-and-504-errors/2952/1 "2021-07-02T14:12:00Z")

</div>

I am using the Create Order API in Sandbox with the optional flags for pricing options, auto\_apply\_taxes = true.

This endpoint is returning intermittent API errors with the same requests. Here are the sample Request / Response. I have a lot of examples of this behavior.

REQUEST BODY  
{  
“order”: {  
“discounts”: ,  
“location\_id”: “L0611V96XE3TS”,  
“line\_items”: [  
{  
“quantity”: “3”,  
“name”: “Hourly rate”,  
“metadata”: {  
“sku”: “P001”  
},  
“base\_price\_money”: {  
“amount”: 500,  
“currency”: “USD”  
},  
“quantity\_unit”: {  
“measurement\_unit”: {  
“time\_unit”: “GENERIC\_HOUR”  
},  
“precision”: 3  
}  
}  
],  
“pricing\_options”: {  
“auto\_apply\_taxes”: true  
}  
},  
“idempotency\_key”: “$9e588710-f5d6-4fe6-acad-174382ccf7ca”  
}

```auto

RESPONSE: 504 GATEWAY TIMEOUT
RESPONSE BODY
    {
  "errors": [
    {
      "code": "GATEWAY_TIMEOUT",
      "detail": "Gateway timeout.",
      "category": "API_ERROR"
    }
  ]
}
```
