# Need help with naming

**URL:** <https://discuss.jsonapi.org/t/need-help-with-naming/1492>\
**Category:** Uncategorized\
**Created:** [January 31, 2019, 3:58pm UTC](https://discuss.jsonapi.org/t/need-help-with-naming/1492 "2019-01-31T15:58:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zelenoff](https://avatars.discourse-cdn.com/v4/letter/z/977dab/32.png) [@zelenoff](https://discuss.jsonapi.org/u/zelenoff)\
**Post date:** [January 31, 2019, 3:58pm UTC](https://discuss.jsonapi.org/t/need-help-with-naming/1492/1 "2019-01-31T15:58:18Z")

</div>

Hello!

I have 1 resource order with 2 very different creation strategies.

How can I name these urls?

Examples:

post /orders/?type=cart  
post /orders/?type=product  
…  
but cart and product - 2 very very different strategies ?

or

post /orders-create/cart/  
post /orders-create/product/

I don’t know

or

post /orders-create-cart/  
post /orders-create-product/

---

<div class="post-metadata">

**Author:** ![SpirIT](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/spirit/32/600_2.png) [@SpirIT](https://discuss.jsonapi.org/u/SpirIT)\
**Post date:** [February 7, 2019, 1:24pm UTC](https://discuss.jsonapi.org/t/need-help-with-naming/1492/2 "2019-02-07T13:24:42Z")

</div>

Hi, I’m no expert but I would go with the first variant, with the ?type param.

Why?  
Because in my opinion is more jsonapi-style:

main urls  
GET /orders  
POST /orders ?type=cart | product  
PUT /orders/1  
DELETE /orders

with the other two versions you would change that structure.  
You can validate the “type” whether its card or product and proceed 🙂

Stefan

---

<div class="post-metadata">

**Author:** ![maark](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/maark/32/184_2.png) [@maark](https://discuss.jsonapi.org/u/maark)\
**Post date:** [February 8, 2019, 11:16pm UTC](https://discuss.jsonapi.org/t/need-help-with-naming/1492/3 "2019-02-08T23:16:50Z")

</div>

Be careful, the `type` query parameter is not part of the specification.

Try this:

```
GET /orders
GET /cart-orders
POST /cart-orders
GET /product-orders
POST /product-orders

```

(I’ll let you figure out the other ones, whatever works best for you)

The idea is that you can have two types if they are that different. But you can have `orders`to cover all the types. You can POST and GET any type, but you can only GET orders.

To give you a better answer, I’d have to know more about what you mean by _different strategies_.
