Reward shop

Getting all orders of a user

A list of all orders a user has made in the reward shop can be retrieved by calling the /api/1/reward-shop/orders/:user_id endpoint.

GET /api/1/reward-shop/orders/mhmshxv6qajmhjy1k9zd8rnvm?locale=en_GB HTTP/1.1
Host: gateway.acme.neo.day
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9........
Content-Type: application/json
HTTP/1.1 200 OK
Content-Type: application/json

{
  "orders": [
    {
      "id": "wg314gh7s5p0685cpolpwctxy",
      "userId": "so1ujth7rtlclqs34s46f872m",
      "partnerId": "dho14ypmwv7jglbirsvtvwfe7",
      "partnerName": "Example partner",
      "deliveryAddress": null,
      "orderItems": [
        {
          "id": "wfo2od74uf8ni7d1ails3qs06",
          "type": {
            "className": "Magneds\\RewardShop\\Components\\Order\\Entity\\ProductOrderItemType",
            "name": "product",
            "data": {
              "varianceId": "ruo1s49x7vnp3vybs3672qx4b",
              "product": {
                "id": "e42biawkjgmja3w6ptxfgljas",
                "description": "",
                "name": "Example product",
                "partner": {
                  "id": "dho14ypmwv7jglbirsvtvwfe7",
                  "name": "Example partner",
                  "termsAndConditions": "",
                  "handlingCosts": [
                    
                  ],
                  "created": "2023-11-15T10:53:55+00:00"
                },
                "label": "",
                "specs": [
                  
                ],
                "variances": [
                  {
                    "id": "ruo1s49x7vnp3vybs3672qx4b",
                    "varianceType": {
                      "systemName": "Coupon",
                      "humanName": "Example coupon",
                      "connectedId": "nq7b7cmqvtmg4kdgeifoosj41",
                      "purchaseInIssuedState": true,
                      "data": {
                        "coupon": {
                          "id": "nq7b7cmqvtmg4kdgeifoosj41",
                          "title": "Example coupon",
                          "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc at congue odio, quis pulvinar nisi. Nunc ligula eros, vulputate in vestibulum et, varius sit amet dolor. Praesent accumsan dolor sit amet nunc volutpat, a feugiat neque auctor. Sed massa nisl, vestibulum sed turpis nec, viverra pretium nibh.",
                          "imageUrl": "https:\/\/assets-internal.ams3.cdn.digitaloceanspaces.com\/media\/ueqp1w4890vkbvonim6c7l8no-Smallkoffieofthee.png",
                          "images": [
                            {
                              "type": "image",
                              "data": {
                                "src": "https:\/\/assets-internal.ams3.cdn.digitaloceanspaces.com\/media\/ueqp1w4890vkbvonim6c7l8no-Smallkoffieofthee.png",
                                "alt": ""
                              }
                            }
                          ],
                          "ticketIssuer": {
                            "systemName": "unlimited-single-code",
                            "prospectDisplay": {
                              "systemName": "button-ticket-display",
                              "buttonText": "Press to claim",
                              "confirmationTitle": "Are you sure?",
                              "confirmationDescription": "After confirmation, your code will be generated."
                            },
                            "issuedDisplay": {
                              "systemName": "exact-code-ticket-display",
                              "instructionText": {
                                "showInstructionText": false,
                                "instructionText": "Show your code to a Neoday cashier",
                                "instructionTextBackgroundColor": {
                                  "mode": "black",
                                  "tint": "default"
                                },
                                "instructionTextTextColor": {
                                  "mode": "white",
                                  "tint": "default"
                                }
                              },
                              "logo": {
                                "showLogo": false,
                                "logoImage": {
                                  "type": "image",
                                  "data": {
                                    "src": "",
                                    "alt": ""
                                  }
                                }
                              },
                              "title": {
                                "showTitle": false,
                                "title": "NeoDay",
                                "titleTextColor": {
                                  "mode": "white",
                                  "tint": "default"
                                }
                              },
                              "claimTimer": {
                                "showClaimTimer": false,
                                "claimTimerText": "Claim time:",
                                "claimTimerTextColor": {
                                  "mode": "white",
                                  "tint": "default"
                                }
                              },
                              "background": {
                                "type": "animation",
                                "animationColorA": {
                                  "mode": "grey",
                                  "tint": "darker"
                                },
                                "animationColorB": {
                                  "mode": "grey",
                                  "tint": "darkest"
                                }
                              },
                              "exactCodeColor": {
                                "mode": "white",
                                "tint": "default"
                              }
                            },
                            "consumedDisplay": {
                              "systemName": "text-ticket-display",
                              "title": "Coupon used",
                              "description": "You have already used this coupon"
                            },
                            "expiredDisplay": {
                              "systemName": "date-text-ticket-display",
                              "title": "Coupon expired",
                              "description": "The coupon has expired",
                              "showExpirationDate": true
                            },
                            "ranOutDisplay": {
                              "systemName": "text-ticket-display",
                              "title": "We ran out of codes",
                              "description": "Unfortunately, we have run out of codes..."
                            },
                            "ticketExpirationHandler": {
                              "systemName": "ticket-expiration-mixed-handler"
                            },
                            "data": {
                              "code": "3X4MPL3-C0D3"
                            }
                          },
                          "expireInterval": null,
                          "endDate": null,
                          "created": "2023-10-01T13:19:05+00:00"
                        }
                      },
                      "hasUnlimitedStock": true,
                      "stock": 0,
                      "available": true,
                      "physical": false
                    },
                    "rank": 0,
                    "name": "Example coupon",
                    "specs": [
                      
                    ],
                    "label": "",
                    "priceGroups": [
                      {
                        "id": "dbqlghseiazs0esotrwnzxo1q",
                        "prices": [
                          {
                            "id": "aksj4k8ua85g1zofnnj7gzltx",
                            "value": 1000,
                            "currency": "STA",
                            "externalPayment": false,
                            "msrp": null
                          }
                        ],
                        "discountLabel": ""
                      },
                      {
                        "id": "kb7fpbyrqvkuszao4k7f14kn7",
                        "prices": [
                          {
                            "id": "gwx3zao0ykpgtigz83i044o7t",
                            "value": 150,
                            "currency": "EUR",
                            "externalPayment": false,
                            "msrp": 300
                          }
                        ],
                        "discountLabel": "percentage"
                      }
                    ],
                    "enabled": true
                  }
                ],
                "userOrderCap": null,
                "enabled": true,
                "hideFromCatalogue": false,
                "created": "2023-11-15T10:53:55+00:00",
                "schedule": {
                  "id": "g0gw5ab3foj6ey4n555hsz9z0",
                  "name": "product-schedule",
                  "title": "Example product",
                  "data": {
                    "productId": "e42biawkjgmja3w6ptxfgljas",
                    "visible": {
                      "id": "wilay1px80f08fpp0xvbucy5e",
                      "name": "Visible",
                      "description": "",
                      "dateRange": {
                        "startDate": null,
                        "endDate": null
                      }
                    },
                    "purchasable": {
                      "id": "kt6ahgly7uvsyb26k99079v1r",
                      "name": "Purchasable",
                      "description": "",
                      "dateRange": {
                        "startDate": null,
                        "endDate": null
                      }
                    }
                  }
                },
                "isVisible": true,
                "isPurchasable": true
              }
            }
          },
          "quantity": 1,
          "name": "Example coupon",
          "prices": [
            {
              "id": "aksj4k8ua85g1zofnnj7gzltx",
              "value": 1000,
              "currency": "STA",
              "externalPayment": false,
              "msrp": null
            },
            {
              "id": "gwx3zao0ykpgtigz83i044o7t",
              "value": 150,
              "currency": "EUR",
              "externalPayment": false,
              "msrp": 300
            }
          ],
          "actions": [
            {
              "systemName": "coupon-slip-order-item-action",
              "data": {
                "couponSlip": {
                  "id": "c8fn4ujl21vt6g62oj46qe7ui",
                  "image": null,
                  "title": "Example coupon",
                  "isRead": false,
                  "ticket": {
                    "code": "3X4MPL3-C0D3",
                    "meta": [
                      
                    ],
                    "state": "issued",
                    "display": {
                      "logo": {
                        "showLogo": false,
                        "logoImage": {
                          "data": {
                            "alt": "",
                            "src": ""
                          },
                          "type": "image"
                        }
                      },
                      "title": {
                        "title": "NeoDay",
                        "showTitle": false,
                        "titleTextColor": {
                          "mode": "white",
                          "tint": "default"
                        }
                      },
                      "background": {
                        "type": "animation",
                        "animationColorA": {
                          "mode": "grey",
                          "tint": "darker"
                        },
                        "animationColorB": {
                          "mode": "grey",
                          "tint": "darkest"
                        }
                      },
                      "claimTimer": {
                        "claimTimerText": "Claim time:",
                        "showClaimTimer": false,
                        "claimTimerTextColor": {
                          "mode": "white",
                          "tint": "default"
                        }
                      },
                      "systemName": "exact-code-ticket-display",
                      "exactCodeColor": {
                        "mode": "white",
                        "tint": "default"
                      },
                      "instructionText": {
                        "instructionText": "Show your code to a Neoday cashier",
                        "showInstructionText": false,
                        "instructionTextTextColor": {
                          "mode": "white",
                          "tint": "default"
                        },
                        "instructionTextBackgroundColor": {
                          "mode": "black",
                          "tint": "default"
                        }
                      }
                    },
                    "expirationDate": null
                  },
                  "userId": "so1ujth7rtlclqs34s46f872m",
                  "couponId": "nq7b7cmqvtmg4kdgeifoosj41",
                  "imageUrl": "https:\/\/assets-internal.ams3.cdn.digitaloceanspaces.com\/media\/ueqp1w4890vkbvonim6c7l8no-Smallkoffieofthee.png",
                  "isDeleted": false,
                  "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc at congue odio, quis pulvinar nisi. Nunc ligula eros, vulputate in vestibulum et, varius sit amet dolor. Praesent accumsan dolor sit amet nunc volutpat, a feugiat neque auctor. Sed massa nisl, vestibulum sed turpis nec, viverra pretium nibh.",
                  "obtainedFrom": "shop-purchase"
                }
              }
            },
            {
              "systemName": "coupon-slip-code-info-order-item-action",
              "data": {
                "couponSlipID": "c8fn4ujl21vt6g62oj46qe7ui",
                "code": "3X4MPL3-C0D3",
                "pin": "",
                "expirationDate": null
              }
            }
          ]
        }
      ],
      "payments": [
        {
          "id": "aaetrd8vircykdndzxi5i5a71",
          "status": "paid",
          "currency": "STA",
          "value": 1000,
          "settings": {
            "transactionReference": "ugzmlkujaa0p3ziulsltpkc77",
            "isRedirect": false,
            "redirectUrl": null,
            "redirectMethod": "GET",
            "redirectData": [
              
            ],
            "acceptCode": null
          }
        },
        {
          "id": "yn5j13qtv5qwb5dx801yz69rd",
          "status": "paid",
          "currency": "EUR",
          "value": 150,
          "settings": {
            "transactionReference": "yn5j13qtv5qwb5dx801yz69rd",
            "isRedirect": true,
            "redirectUrl": "\/reward-shop\/order\/wg314gh7s5p0685cpolpwctxy\/payment\/yn5j13qtv5qwb5dx801yz69rd\/adyen?locale=nl_NL",
            "redirectMethod": "GET",
            "redirectData": null,
            "acceptCode": null
          }
        }
      ],
      "locale": "nl_NL",
      "status": "completed",
      "created": "2023-11-14T11:12:51+00:00",
      "expires": "2023-11-14T21:12:51+00:00"
    },
    ...
  ]
}