Shopify Rest Admin API

Solved
Tourist
12 0 1

Hi All,

 

I made an order successfully through REST ADMIN api using order.json method. But when i try to fetch the order list its not showing the order details, even the count.json method shows order count as 0.

 

But when i try to get order details by passing the OrderId , i am getting successful response. Please advice.

 

Thank you.

 

0 Likes
Shopify Staff
Shopify Staff
268 36 38

Hey @velmurugan,

 

Can you share your POST & GET calls? Are you able to provide the store URL?

0 Likes
Tourist
12 0 1

Hi @scottydont,

                                  

                            Thanks for your reply. Please find the Order POST and GET URL for your reference.

 

Post Order:

 

POST /admin/api/2019-07/orders.json
{
  "order": {
    "email": "foo@example.com",
    "fulfillment_status": "fulfilled",
    "line_items": [
      {
        "variant_id": 447654529,
        "quantity": 1
      }
    ]
  }
}

 

Get Order : Getting null array as [ ].

GET /admin/api/2019-07/orders.json

 

1 Like

Success.

Shopify Staff
Shopify Staff
268 36 38

Thanks @velmurugan.

 

That suggests the initial POST is failing. How does the response look? If you can provide a request ID (from the response headers) I can dig deeper.

0 Likes
Highlighted
Tourist
12 0 1

Hi @scottydont ,

 

0 Likes
Tourist
12 0 1

Hi @scottydont ,

                         Thanks for your help,

I found the issue...there are some 4 to 5 sample Order creation is given in the Order Create Doc section.

 

if Create order with the below particular POST REQUEST alone the GET order is not working but works for other POST.

 

Create a simple order, sending an order confirmation and a shipping confirmation to the customer

POST /admin/api/2019-10/orders.json
{
  "order": {
    "email": "foo@example.com",
    "fulfillment_status": "fulfilled",
    "send_receipt": true,
    "send_fulfillment_receipt": true,
    "line_items": [
      {
        "variant_id": 457924702,
        "quantity": 1
      }
    ]
  }
}
0 Likes