************************ Personalization Requests ************************ Personalization requests allow the creator of an order to request their friends to personalize tickets. The creator of an order can create a personalization request by specifying a ticket and the email address of their friend. The Paylogic system will send an email to this email address. The email contains a link to a page where the friend can enter their details. This page is about the creation and management of a personalization request. The process of a friend personalizing their tickets is documented in :doc:`/documentation/personalization`. .. _create-personalization-request: Create a personalization request ================================ The first step in asking friend to personalize is creating a personalization request. This requires access to an :doc:`order ` with :doc:`tickets ` requiring personalization, within the personalization period of the :doc:`event `. Authenticate the creation of a personalization request using a :ref:`cognito-token` or :ref:`order-token`. Request data ------------ ========================= ============================================ ================================================= Field name Type Description ========================= ============================================ ================================================= email String Email address of the person who will be requested by email to personalize. order :doc:`orders` reference A reference to the order of the tickets. All tickets must belong to the same order. tickets :doc:`Ticket ` references A list of references to tickets requested to be personalized. ========================= ============================================ ================================================= Example request --------------- .. code-block:: bash [POST] https://shopping-api.paylogic.com/personalization-request .. code-block:: javascript { "email": "john.doe@example.org", "order": "https://shopping-api.paylogic.com/orders/efccc5a465194fe38df0848f5288e886", "tickets": [ "https://shopping-api.paylogic.com/tickets/922831e1d3914370b820488ce21649ef", "https://shopping-api.paylogic.com/tickets/da14e70160f24af49fc6f7f88b25ad51", ] } Response -------- ==================== ================================================================= ============================================== Field name Type Description ==================== ================================================================= ============================================== email String The email address of the person who was asked to personalize. state String The status of the order. See the table below for the values. created_at Datetime The date and time the personalization request was created. tickets :doc:`/documentation/tickets` list Tickets in the personalization request that are requested to be personalized. products :doc:`/documentation/product` list Products in the personalization request. analytics_data :ref:`Analytics data ` Data intended for analytics. ==================== ================================================================= ============================================== Personalization request states ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ============ =========================================================================================================== State Description ============ =========================================================================================================== Pending The personalization request has been created. Completed The tickets in the personalization request have been personalized. Canceled The personalization request is canceled and no longer valid. ============ =========================================================================================================== .. _personalization-request-analytics-data: Personalization request analytics data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================== ========= ======================= Key Type Description ================== ========= ======================= order_reference Number The order reference. event_reference Number The event reference. ================== ========= ======================= .. _personalization-request-response-schema: Example Response ---------------- .. code-block:: javascript { "_links": { "event": { "href": "https://shopping-api.paylogic.com/events/e60762ab985e423587ae290d0f64566d" }, "self": { "href": "https://shopping-api.paylogic.com/personalization-requests/c999f7100be74433ba18489606a093d7" }, "tickets": [ { "href": "https://shopping-api.paylogic.com/tickets/922831e1d3914370b820488ce21649ef" }, { "href": "https://shopping-api.paylogic.com/tickets/da14e70160f24af49fc6f7f88b25ad51" } ] }, "created_at": "2020-07-21T12:42:37Z", "email": "john.doe@example.org", "state": "pending", "analytics_data": { "order_reference": 1, "event_reference": 2, }, "_embedded": { "products": [ { "_links": { "event": { "href": "https://shopping-api.paylogic.com/events/e60762ab985e423587ae290d0f64566d" }, "self": { "href": "https://shopping-api.paylogic.com/products/e3239997301e4abd88e1d8a524d21ca4" } }, "name": { "de": "", "en": "Saturday Ticket", "es": "", "fr": "", "nl": "", "pt": "", "tr": "" }, "subtitle": { "de": "", "en": "All Access", "es": "", "fr": "", "nl": "", "pt": "", "tr": "" } }, // ... ], "event": { "_links": { "self": { "href": "https://shopping-api.paylogic.com/events/e60762ab985e423587ae290d0f64566d" } }, "title": { "en": "Event 1", "nl": "Evenement 1", "de": "", "es": "", "fr": "", "pt": "" }, "subtitle": { "en": "A subtitle", "nl": "", "de": "", "es": "", "fr": "", "pt": "" }, "event_start": "2021-05-11T14:19:30Z", "event_end": "2021-05-31T14:19:30Z", "personalization_start": "2020-07-21T11:42:35Z", "personalization_end": "2020-07-21T13:42:35Z", "location": { "city": "San Fransisco", "country": "US", "latitude": 37.77, "longitude": 122.3879, "name": "Chase center", "postal_code": "94158" } }, "tickets": [ { "_links": { "curies": [ { "href": "https://shopping-api-docs.paylogic.com/documentation/{rel}.html", "name": "shop", "templated": true, "type": "text/html" } ], "product": { "href": "https://shopping-api.paylogic.com/products/e3239997301e4abd88e1d8a524d21ca4" }, "self": { "href": "https://shopping-api.paylogic.com/tickets/85c0c1a554d54e6792b74134906be379" }, "shop:order": { "href": "https://shopping-api.paylogic.com/orders/efccc5a465194fe38df0848f5288e886" } }, "code": "8278798513688", "needs_personalization": true, "personalization_start": "2020-07-21T11:42:35Z", "personalization_end": "2020-07-21T13:42:35Z", "personalization_form": { "date_of_birth": { "required": true }, "email": { "required": true, "unique_per_product": false }, "first_name": { "required": true }, "gender": { "required": true }, "last_name": { "required": true }, "phone_number": { "required": true } }, "seating": { // ... }, "status": "valid" }, // ... ] } } Get details of an existing personalization request ================================================== If you want to display or check on the progress of a personalization request, you can retrieve its details. Get the reference from the response when you :ref:`created the personalization request `. Authenticate the retrieval of a personalization request using a :ref:`cognito-token`, :ref:`personalization-request-token` or :ref:`order-token`. .. code-block:: bash [GET] https://shopping-api.paylogic.com/personalization-requests/c999f7100be74433ba18489606a093d7 The server will respond with the same fields as when :ref:`creating a personalization request`. Cancel a personalization request ================================ The creator of a personalization request may cancel the request. This will block a friend from completing a personalization request for tickets that have not been personalized yet. Cancelling a personalization request will not remove existing personalization, it will only block further/future personalization. Authenticate the cancellation of a personalization request using a :ref:`cognito-token`, :ref:`personalization-request-token` or :ref:`order-token`. .. code-block:: bash [DELETE] https://shopping-api.paylogic.com/personalization-request/c999f7100be74433ba18489606a093d7 The server will respond with ``204 NO CONTENT`` if the personalization request was successfully canceled.