Articles in this section
Category / Section

Updating Pass Properties with Neostore API

Published:
Updated:

In this guide, you will learn how to update the properties of a pass for a specific tenant using the Neostore API. Keeping pass information current and relevant is crucial for maintaining accurate records and ensuring a seamless user experience. Whether you are updating a customer’s membership details, modifying access permissions, or adding new information to an existing pass, the Neostore API provides a straightforward and efficient way to manage these updates. By following the steps outlined in this guide, you will be able to securely authenticate your requests, specify the necessary parameters, and submit the required data to keep your tenant’s pass information up-to-date.


API Endpoint

Endpoint: /api/{tenantId}/passes

This endpoint allows you to update properties of a pass for a given tenant.


Prerequisites

  1. Create API Key from your Back Office

    Before you can make requests to this API, you need to create an API key from your back office. This API key is required to authenticate your requests. For more information see: Create API Key from your Back Office.


Necessary parameters

Request URL

PATCH

https://app.neostore.cloud/api/{tenantId}/passes

Path Parameters

  • tenantId (string): The unique identifier for the tenant whose pass is being updated. This value should be included in the URL.

Query Parameters

  • id (string): The unique identifier of the pass you wish to update must be specified. When updating a pass with a Neostore internal ID, only the “id” key needs to be specified (e.g. “id”: “Ed34kg3oA47”). When updating a pass with an external identifier, the key should be prefixed with “id” (e.g. “id.y2.customerId”: “1233332”). If multiple external identifiers are provided, all must be valid. This parameter is required.
  • passType (string): The type of pass you are updating. The passType parameter should match one of the file types in the server/passes/ directory of your tenant configuration. This parameter is required.

Request Headers

  • x-api-key: {your_api_key} (Replace {your_api_key} with the API key you created in the back office)

Request Body

The request body should contain the properties you wish to add or update in the pass. The body should be a JSON object.

Example:

{
    "additionalData": {
        "message": "This is a new message !"
    }
}

Postman Environment

To make testing easier, we have prepared a Postman environment where you can test the API. You can access it using the following link:

Postman Environment for API Testing


Next Steps: Utilizing Updated Pass Data

Now that you know how to update pass properties using the Neostore API, you might be wondering what you can do with this updated data. In our next article, we will explore various use cases and examples of how to leverage the updated pass information.

Stay tuned for our upcoming article: Leveraging Updated Pass Data with Neostore API.

Access denied
Access denied