SicPama APIs ## Sections • [Introduction](https://docs.sicpama.com/getting-started/introduction.md): SicPama REST APIs for Raptor POS integration. Title Description 🚀 Just getting started? Check out our Quickstart Guide. 🗓️ Need any assistance? Book a meeting • [Basics of APIs](https://docs.sicpama.com/api-reference-guide/basics-of-apis.md): Theneo offers a comprehensive and flexible selection of API formats and collection types to meet diverse integration and development needs. Our platform supports various API formats, such as REST, SOAP, GraphQL, and Async APIs, each designed for specific use cases and requirements. We also provide compatibility with multiple API specification collections, ensuring smooth integration and an efficient development process. HTTP Methods HTTP methods, or verbs, denote actions performed on resources. Theneo APIs support various HTTP methods: GET: Retrieve a representation of a specific resource. Example: Retrieving transaction details. POST: Submit data to create a new resource or trigger a state change. Example: Creating a new customer profile. PUT: Replace all representations of a target resource with the provided payload. Example: Updating a subscription plan. DELETE: Remove a specified resource. Example: Deleting a stored card. PATCH: Apply partial modifications to a resource. Example: Changing the status of an existing order. Parameters Parameters allow customization of API requests and responses. Theneo APIs support four types of parameters: Path Parameters: Integral parts of the endpoint URL, identifying specific resources. Query Parameters: Appended to the endpoint URL to filter or paginate results. Request Body Parameters: Included in the request body, transmitting data to the API server. Response Body Parameters: Represent data returned by the server in response to a request. HTTP Status Codes HTTP status codes communicate the outcome of client requests. Theneo employs HTTP status codes categorized into the following classes: Success (200): The request was successfully processed. Example: Successfully retrieved a resource or completed an action. 400 (Bad Request): The server could not understand the request due to invalid syntax. Example: Missing required parameters in the request. 401 (Unauthorized): Authentication is required and has failed or has not yet been provided. Example: Invalid or missing API key. 402 (Request Failed): The parameters were valid but the request failed. Example: Insufficient funds or expired credit card. 403 (Forbidden): The client does not have access rights to the content. Example: Attempting to access a resource without the necessary permissions. 404 (Not Found): The server can not find the requested resource. Example: Trying to access an endpoint that does not exist. • [Base URL](https://docs.sicpama.com/api-reference-guide/base-url.md): The Base URL is a crucial element for making API calls, enabling you to clearly specify the root URL(s) for API requests. When making API calls, you combine the base URL with the specific endpoint path to form the complete request URL. It supports multiple environments, including staging and production. Additionally, the base URL synchronizes with the API explorer, allowing you to seamlessly switch between environments like Sandbox and Production while trying out API calls. • [Authentication](https://docs.sicpama.com/api-reference-guide/authentication.md): When it comes to interacting with APIs, authentication is a critical step to ensure secure communication between your application and the API service. API authentication is performed via HTTP Basic Auth, which involves including your API key in the HTTP request headers. This method verifies your identity and grants you access to the API's resources, ensuring that only authorized users can make requests. SicPama API uses API key to authenticate requests. To retrieve your API key, contact SicPama for details. Add headers to an HTTP request When issuing an HTTP request to SicPama, each request must contain an x-api-key header that specifies a valid API key. CURL curl -s -X POST "https://sg-api.com/user-example" \ -H "Content-Type: application/json" \ -H "x-api-Key: YOUR_API_KEY" \ -d '{ "given_name": "Theneo", "last_name": "APIDoc", "mail": "hello@theneo.io", "phone_number": "" } Your API keys grant significant access, so it’s crucial to keep them safe! Avoid sharing your secret API keys in public places like GitHub, client-side code, and similar locations. API requests without authentication will fail. • [Customer CRM APIs](https://docs.sicpama.com/collections/customer-crm-api-example.md): stored-value In a stored value campaign, customers can top up money into their account either at Raptor POS or through Sicpama. The system will credit extra value based on the top-up promotion. Example: • Top up $100 → receive $120 credit • Top up $300 → receive $400 credit The stored value works like an e-wallet balance. When the customer makes a purchase, they can redeem the stored value to offset their bill, similar to cashback redemption. voucher In a voucher campaign, customers receive vouchers either when they first join the program or during special campaigns (e.g., birthday, anniversary, seasonal promotions). Vouchers can be configured in different units, such as: • BillDollarValue → fixed value discount on the bill (e.g., $10 off total bill) • BillDollarPercentage → percentage discount on the bill (e.g., 10% off total bill) • ItemDollarValue → fixed value discount on a specific item (e.g., $2 off Coke) • ItemDollarPercentage → percentage discount on a specific item (e.g., 20% off Burger) Customers can redeem these vouchers at Raptor POS, which will validate and apply the discount to the transaction. • [Retrieve Customer Campaign Balances by Phone Number](https://docs.sicpama.com/collections/customer-crm-api-example/retrieve-customer-campaign-balances-by-phone-number-copy-1.md) • [Retrieve Customer Campaign Balances by Email](https://docs.sicpama.com/collections/customer-crm-api-example/create-customer.md) • [Retrieve Stored-Value Packages](https://docs.sicpama.com/collections/customer-crm-api-example/void-multiple-transactions-copy-1.md): When a customer wants to top-up through POS, this endpoint is used to get all available top-up packages for the respective store. • [Customer Forget PIN](https://docs.sicpama.com/collections/customer-crm-api-example/list-all-customers.md): For redeem, a 4-digit PIN number can be required to ensure the redemption is valid to the right customer. Customers can set up their own PIN via the QR ordering. If they forget the PIN, they can reset through the QR ordering or staff can trigger at POS using this API. When POS calls this API, a new PIN will be sent to the customer's WhatsApp. Merchants can turn on / off “PIN required for redemption” via SicPama merchant backend (Details UI will be shared later). • [Top Up Stored Value](https://docs.sicpama.com/collections/customer-crm-api-example/redeem-stored-value-copy-1.md) • [Redeem Stored-Value](https://docs.sicpama.com/collections/customer-crm-api-example/customer-forget-pin-copy-1.md) • [Redeem Voucher](https://docs.sicpama.com/collections/customer-crm-api-example/redeem-stored-value-copy.md) • [Redeem Points](https://docs.sicpama.com/collections/customer-crm-api-example/redeem-voucher-copy-1.md) • [Submit Sales](https://docs.sicpama.com/collections/customer-crm-api-example/void-multiple-transactions-copy.md) • [Void Multiple Transactions](https://docs.sicpama.com/collections/customer-crm-api-example/redeem-voucher-copy.md): When a transactionId is voided, it cannot be re-used • [QR Code Generation and Invalidation](https://docs.sicpama.com/collections/transaction-api-example.md): POS can use these APIs to generate QR codes for customers to scan to order and invalidate generated QR codes when the bill is settled. • [Generate QR Code](https://docs.sicpama.com/collections/transaction-api-example/qr-code-generation.md) • [Invalidate QR Code](https://docs.sicpama.com/collections/transaction-api-example/invalidate-qr-code.md) • [Stock out PLU items](https://docs.sicpama.com/collections/hr-management-examples/stock-out-plu-items.md): POS send a list of plu need to be stocked out in QR ordering too.POS send a list of plu items need to be