{"templateId":"markdown","versions":[{"version":"opendelivery","label":"Open Delivery API","link":"/en/apis/docs/signature-calculation/generation","default":true,"active":true,"folderId":"62a846bf"},{"version":"standard","label":"Standard Keeta API","link":"/en/apis/standard/docs/signature-calculation/generation","default":false,"active":false,"folderId":"62a846bf"},{"version":"grocery","label":"Grocery Keeta API","link":"/en/apis/grocery/docs/signature-calculation/generation","default":false,"active":false,"folderId":"62a846bf"}],"sharedDataIds":{"sidebar":"sidebar-@l10n/en/apis/@opendelivery/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Signature Generation Process"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"id":"signature-generation-process","level":1,"__idx":0},"children":["Signature Generation Process "]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-extract-request-components","__idx":1},"children":["Step 1: Extract Request Components"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL"]},": Extract the base URL (without query parameters)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Query Parameters"]},": Extract all enabled query parameters"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request Body"]},": Process the request body content"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-build-signature-string","__idx":2},"children":["Step 2: Build Signature String"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The signature string is constructed by concatenating the following components with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["&"]}," as separator:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"curl","header":{"controls":{"copy":{}}},"source":"signature_string = URL + \"&\" + sorted_query_params + \"&\" + request_body\n","lang":"curl"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"21-url-processing","__idx":3},"children":["2.1 URL Processing"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use the base URL without query parameters"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.example.com/v1/orders"]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"22-query-parameters-processing","__idx":4},"children":["2.2 Query Parameters Processing"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Extract all enabled query parameters"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sort parameters by key name (alphabetical order)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Format each parameter as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key=value"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Join multiple parameters with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["&"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Handle null/undefined values as empty strings"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"curl","header":{"controls":{"copy":{}}},"source":"Original parameters: {c: \"3\", a: \"1\", b: \"2\"}\nSorted result: a=1&b=2&c=3\n","lang":"curl"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"23-request-body-processing","__idx":5},"children":["2.3 Request Body Processing"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["JSON Format: Use JSON string directly"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Null Value Handling: Empty objects ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{}"]}," or empty strings will be skipped"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Type Conversion: Non-string types will be converted to JSON strings"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-calculate-hmac-sha256-signature","__idx":6},"children":["Step 3: Calculate HMAC-SHA256 Signature"]},"\n  1. Use the constructed signature string as the message\n  2. Use the provided secret key\n  3. Calculate HMAC-SHA256 hash\n  4. Encode the result in Base64 format\n"]},"headings":[{"value":"Signature Generation Process","id":"signature-generation-process","depth":1},{"value":"Step 1: Extract Request Components","id":"step-1-extract-request-components","depth":3},{"value":"Step 2: Build Signature String","id":"step-2-build-signature-string","depth":3},{"value":"2.1 URL Processing","id":"21-url-processing","depth":4},{"value":"2.2 Query Parameters Processing","id":"22-query-parameters-processing","depth":4},{"value":"2.3 Request Body Processing","id":"23-request-body-processing","depth":4},{"value":"Step 3: Calculate HMAC-SHA256 Signature","id":"step-3-calculate-hmac-sha256-signature","depth":3}],"frontmatter":{"slug":"/apis/opendelivery/signature-calculation/signature-generation-process","seo":{"title":"Signature Generation Process"}},"lastModified":"2026-11-12T19:50:41.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/en/apis/opendelivery/signature-calculation/signature-generation-process","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}