# Release point lock for profile

- Operation ID: `endpointLockReleaseLockForClientPOST`
- HTTP method: `POST`
- Path: `/v4/promotions/lock/release-points-lock-for-client/{identifierType}/{identifierValue}/{lockIdentifier}`
- [Human-readable API reference](https://hub.synerise.com/api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/endpointLockReleaseLockForClientPOST)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /v4/promotions/lock/release-points-lock-for-client/{identifierType}/{identifierValue}/{lockIdentifier}:
    post:
      tags:
        - Promotion locks
      summary: Release point lock for profile
      description: |
        Release a [point lock](#operation/endpointLockCreateLockForClientPOST) from a profile. That profile can now activate and de-activate promotions based on loyalty points.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `PROMOTIONS_LOCK_UPDATE`

        **User role permission required:** `campaigns_promotions: update`
      operationId: endpointLockReleaseLockForClientPOST
      security:
        - JWT: []
      parameters:
        - name: lockIdentifier
          in: path
          description: Lock identifier
          required: true
          schema:
            type: string
            example: 2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119
        - name: identifierType
          in: path
          description: |
            The Profile identifier to use for the request.

            `externalId` is known as `customId` or `custom_identify` in other Synerise services.
          required: true
          schema:
            type: string
            example: email
            enum:
              - email
              - phone
              - externalId
              - uuid
              - clientId
        - name: identifierValue
          in: path
          description: The value of the selected identifier
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Lock released
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Lock release succeeded
        "400":
          description: Request body invalid/malformed/missing elements
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    title: JSON content issue
                    properties:
                      message:
                        type: string
                        description: Summary of the error
                      error:
                        description: Details of the error
                        anyOf:
                          - type: array
                            description: An array of objects with error details
                            items:
                              type: object
                              description: Details of an error
                              properties:
                                message:
                                  type: string
                                  description: Short description of the error
                                  example: Internal Error
                                additionalProperties:
                                  description: Additional information, if applicable
                          - type: string
                            description: Description of the error
                  - type: object
                    title: JSON structure issue
                    properties:
                      message:
                        type: string
                        description: Summary of the error
                      code:
                        type: string
                        description: String-type code of the error
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP code of the problem
                  error:
                    type: string
                    description: Summary of the error
                  message:
                    type: string
                    description: Error details
                  timestamp:
                    type: string
                    description: Time when the error occurred
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP code of the problem
                  error:
                    type: string
                    description: Summary of the error
                  message:
                    type: string
                    description: Error details
                  timestamp:
                    type: string
                    description: Time when the error occurred
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Short summary of the response
              example:
                message: Profile not found
        "409":
          description: Lock already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Short summary of the response
              example:
                message: Lock already exits
      x-snr-doc-urls:
        - /api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/endpointLockReleaseLockForClientPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119 \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: Promotion locks
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
```
