question

go3-john avatar image
go3-john asked Jeffrey Blattman edited

Create Custom Order with modifiers as well.

I am using the APIs to create Custom Orders not Atomic Order.
I create the order and create ad-hoc line items by calling separate methods. But I can not create the Non-Clover modifiers under the ad-hoc items.

Do you have any suggestion to add the Non-Clover modifiers in the orders?

OrdersInventoryCustom Modifiers
4 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·
Can you provide more detail about what endpoints you are calling and what payloads you are using?
0 Likes 0 ·
go3-john avatar image go3-john Jeffrey Blattman ♦♦ commented ·

1. First, I called order APIs to create a custom order :

https://sandbox.dev.clover.com/v3/merchants/{mId}/orders


2. And then, called the items APIs based on the docs (https://docs.clover.com/docs/creating-custom-orders)

https://sandbox.dev.clover.com/v3/merchants/{mId}/bulk_items


Both steps, creating orders and line items passed through, but when doing the modifier.


As I saw, the docs just showed me how to use the clover modifiers, but there isn't a Non-Clover Modifier intro. (https://docs.clover.com/docs/creating-custom-orders#adding-item-modifiers)


So, is it possible to create Non-Clover modifiers via bulk items APIs?

0 Likes 0 ·
go3-john avatar image go3-john Jeffrey Blattman ♦♦ commented ·

LineItem Payloads:

 [
   {
        "name": "Dinner For Four \u56db\u4eba\u5957\u9910 ",
        "price": 3449,
        "priceWithModifiers": 0,
        "unitQty": 2000,
        "note": "",
        "modifications": []
    },
    {
        "name": "Dinner For Nine \u4e5d\u4eba\u5957\u9910",
        "price": 7099,
        "priceWithModifiers": 350,
        "unitQty": 1000,
        "note": null,
        "modifications": [
            {
                "name": "Dinner For Nine  include appetitizer",
                "amount": 1,
                "modifier": {
                    "name": "pork egg roll ",
                    "price": 0
                }
            },
            {
                "name": "Dinner For Nine  include soup",
                "amount": 1,
                "modifier": {
                    "name": "wonton soup",
                    "price": 0
                }
            },
            {
                "name": "Dinner For Nine  include entree",
                "amount": 1,
                "modifier": {
                    "name": "Chicken w. ",
                    "price": 0
                }
            },
            {
                "name": "choice of rice",
                "amount": 1,
                "modifier": {
                    "name": "House Special Fried Rice",
                    "price": 350
                }
            }
        ]
   }
]
0 Likes 0 ·
go3-john avatar image go3-john Jeffrey Blattman ♦♦ commented ·

Order Payload:

I passed Order APIs, but there are no customers saved. Maybe we still need the customer id as the parameter. We are concerned with the Non-Clover Modifiers for now.

{
    "customers": [
        {
            "addresses": [
                {
                    "address_line1": "",
                    "address_line2": "",
                    "city": "",
                    "state": "",
                    "zip": "",
                    "phoneNumber": "1234567890"
                }
            ],
            "emailAddresses": [
                {
                    "emailAddress": "example@gmail.com"
                }
            ],
            "phoneNumbers": [
                {
                    "phoneNumber": "1234567890"
                }
            ],
            "firstName": "John Li"
        }
    ],
    "taxRemoved": true,
    "total": 37862,
    "state": "open",
    "paymentState": "OPEN"
}
0 Likes 0 ·

1 Answer

·
Jeffrey Blattman avatar image
Jeffrey Blattman answered Jeffrey Blattman edited

There is not a concept of a custom modifier. All modifiers are required to be based on a modification.

A line item does have a note field. That is sometimes used to add additional information (free form) about the line item. You can think of this as a custom modifier. There's only a single note per line item.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community