Order fulfillment not added

Hi everyone,

I am currently able to create and order and to pay for it. The issue I am having is that for some reason the order fulfillment details are getting missed.

Here is an example of the payload posted to create an order:

{
  "idempotency_key": "UNIQUE_KEY_HERE",
  "order": {
    "state": "OPEN",
    "location_id": "LOCATION_ID_FROM_SQUARE",
    "customer_id": "CUSTOMER_ID_FROM_SQUARE",
    "reference_id": "REFERENCE_ID",
    "source": {
      "name": "CMA-DriveThru"
    },
    "taxes": [
      {
        "catalog_object_id": "YEO2WMLGEJRHT7KYTMRAJCKO"
      }
    ],
    "line_items": [
      {
        "item_type": "ITEM",
        "quantity": "1",
        "catalog_object_id": "K5BEJCTJDK54JAO62I43QQ7U",
        "modifiers": [
          {
            "catalog_object_id": "H7GDT2AZ5VDXOS43BM5WMXTL"
          },
          {
            "catalog_object_id": "A7DHBCGCWNUB42TN7ECZKDSL"
          },
          {
            "catalog_object_id": "WJPRZDWTPSD6JK2ZGF5BBTIU"
          },
          {
            "catalog_object_id": "TDLV7FH2IZQEI2NR5GNFBOOK"
          },
          {
            "catalog_object_id": "H4Q42HGCK6ABWQC66TYM3T5E"
          },
          {
            "catalog_object_id": "QWH5VGDXS2T3EN2YFC3KKJ7Q"
          }
        ]
      },
      {
        "item_type": "ITEM",
        "quantity": "1",
        "catalog_object_id": "VQC6YLQEJD6KALGLR2Q6WLED",
        "modifiers": [
          {
            "catalog_object_id": "PIUCDST2EVGAPCVCRWDXH27K"
          }
        ]
      }
    ],
    "fulfillments": [
      {
        "state": "PROPOSED",
        "type": "PICKUP",
        "uid": "c4ca4238a0b923820dcc509a6f75849b",
        "pickup_details": {
          "recipient": {
            "customer_id": "CUSTOMER_ID_FROM_SQUARE",
            "display_name": "James",
            "email_address": "[email protected]",
            "phone_number": "0000000000"
          },
          "is_curbside_pickup": false,
          "note": "ticket_comment",
          "schedule_type": "ASAP",
          "pickup_at": "2021-09-14T14:46:28-04:00"
        }
      }
    ]
  }
}

Am I missing something?

Created order number: tVxd1p3YHdBKU6gRNXFEq5Mlt7IZY

:wave: Looks like this order was originally created without a fulfillment. There are multiple additional requests with the same idempotency_key which will alway’s return the initial result. If you change the idempotency_key it will create an order with a fulfillment. :slightly_smiling_face:

Hi,

We are creating the Orders Online in the portal. We are selling items that get added to the cart and then paid in the Checkout. The items can be Picked up or Delivered. We need to get the fulfillment information for the Deliveries using the API. Is there a way to setup different idempotency_key when the orders are created online by the customers? Or how can we get the fulfillment information out with any APY?

The order id is: V7T08cn2TvF7jdJP9SXryz6x0RQZY

This is what comes out using Rest API:

“item_type”:“ITEM”}],
“fulfillments”:[
{
“uid”:“SUNkUhy6QfnWR1FGkvnYZB”,
“type”:“DELIVERY”,
“state”:“PROPOSED”,
“line_item_application”:“ALL”
}
],

And this is what comes out using GraphQL:

{
“data”: {
“orders”: {
“nodes”: [
{
“fulfillments”: [
{
“state”: “PROPOSED”,
“pickup”: null,
“shipment”: null,
“uid”: “SUNkUhy6QfnWR1FGkvnYZB”
}
],
“id”: “V7T08cn2TvF7jdJP9SXryz6x0RQZY”,
“lineItems”: [
{
“uid”: “zEDVghd3EbiTCS6SmN0poD”,

Any idea?

Hey, @Expert_Learner!

I work on GraphQL – I’m not totally sure what is missing from the last post, can you share the query used and the expected result? We should be able to take a look with that information (your merchant ID is probably a good idea as well)