Ring up an in-person sale
curl --request POST \
--url https://api.salesive.com/api/v1/pos/sales \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"_id": "6699aabbccddeeff00112233",
"name": "Jollof rice",
"price": 2500,
"qty": 2
}
],
"discount": 0,
"tax": 375,
"paymentMethod": "cash",
"customerName": "Walk-in"
}
'import requests
url = "https://api.salesive.com/api/v1/pos/sales"
payload = {
"items": [
{
"_id": "6699aabbccddeeff00112233",
"name": "Jollof rice",
"price": 2500,
"qty": 2
}
],
"discount": 0,
"tax": 375,
"paymentMethod": "cash",
"customerName": "Walk-in"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [{_id: '6699aabbccddeeff00112233', name: 'Jollof rice', price: 2500, qty: 2}],
discount: 0,
tax: 375,
paymentMethod: 'cash',
customerName: 'Walk-in'
})
};
fetch('https://api.salesive.com/api/v1/pos/sales', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.salesive.com/api/v1/pos/sales",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'_id' => '6699aabbccddeeff00112233',
'name' => 'Jollof rice',
'price' => 2500,
'qty' => 2
]
],
'discount' => 0,
'tax' => 375,
'paymentMethod' => 'cash',
'customerName' => 'Walk-in'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salesive.com/api/v1/pos/sales"
payload := strings.NewReader("{\n \"items\": [\n {\n \"_id\": \"6699aabbccddeeff00112233\",\n \"name\": \"Jollof rice\",\n \"price\": 2500,\n \"qty\": 2\n }\n ],\n \"discount\": 0,\n \"tax\": 375,\n \"paymentMethod\": \"cash\",\n \"customerName\": \"Walk-in\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.salesive.com/api/v1/pos/sales")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"_id\": \"6699aabbccddeeff00112233\",\n \"name\": \"Jollof rice\",\n \"price\": 2500,\n \"qty\": 2\n }\n ],\n \"discount\": 0,\n \"tax\": 375,\n \"paymentMethod\": \"cash\",\n \"customerName\": \"Walk-in\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/pos/sales")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"_id\": \"6699aabbccddeeff00112233\",\n \"name\": \"Jollof rice\",\n \"price\": 2500,\n \"qty\": 2\n }\n ],\n \"discount\": 0,\n \"tax\": 375,\n \"paymentMethod\": \"cash\",\n \"customerName\": \"Walk-in\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"message": "<string>",
"data": {
"_id": "<string>",
"orderId": 123,
"shop": "<string>",
"user": "<string>",
"items": [
{
"_id": "<string>",
"name": "<string>",
"price": 123,
"quantity": 123,
"sku": "<string>",
"imageUrl": "<string>",
"itemType": "product"
}
],
"subtotal": 123,
"discount": 123,
"tax": 123,
"shippingCost": 123,
"status": "pending",
"source": "online",
"paymentMethod": "cash",
"posCustomerName": "<string>",
"posCustomerEmail": "<string>",
"posCustomerPhone": "<string>",
"additionalInfo": [
{
"label": "<string>",
"value": "<string>"
}
],
"payment": {
"_id": "<string>",
"status": "<string>",
"amount": 123,
"total": 123,
"channel": "<string>",
"provider": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Point of sale
Ring up an in-person sale
Create a POS sale, marked paid, with a completed payment record. Requires the WRITE_POS scope.
POST
/
pos
/
sales
Ring up an in-person sale
curl --request POST \
--url https://api.salesive.com/api/v1/pos/sales \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"_id": "6699aabbccddeeff00112233",
"name": "Jollof rice",
"price": 2500,
"qty": 2
}
],
"discount": 0,
"tax": 375,
"paymentMethod": "cash",
"customerName": "Walk-in"
}
'import requests
url = "https://api.salesive.com/api/v1/pos/sales"
payload = {
"items": [
{
"_id": "6699aabbccddeeff00112233",
"name": "Jollof rice",
"price": 2500,
"qty": 2
}
],
"discount": 0,
"tax": 375,
"paymentMethod": "cash",
"customerName": "Walk-in"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [{_id: '6699aabbccddeeff00112233', name: 'Jollof rice', price: 2500, qty: 2}],
discount: 0,
tax: 375,
paymentMethod: 'cash',
customerName: 'Walk-in'
})
};
fetch('https://api.salesive.com/api/v1/pos/sales', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.salesive.com/api/v1/pos/sales",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'_id' => '6699aabbccddeeff00112233',
'name' => 'Jollof rice',
'price' => 2500,
'qty' => 2
]
],
'discount' => 0,
'tax' => 375,
'paymentMethod' => 'cash',
'customerName' => 'Walk-in'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salesive.com/api/v1/pos/sales"
payload := strings.NewReader("{\n \"items\": [\n {\n \"_id\": \"6699aabbccddeeff00112233\",\n \"name\": \"Jollof rice\",\n \"price\": 2500,\n \"qty\": 2\n }\n ],\n \"discount\": 0,\n \"tax\": 375,\n \"paymentMethod\": \"cash\",\n \"customerName\": \"Walk-in\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.salesive.com/api/v1/pos/sales")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"_id\": \"6699aabbccddeeff00112233\",\n \"name\": \"Jollof rice\",\n \"price\": 2500,\n \"qty\": 2\n }\n ],\n \"discount\": 0,\n \"tax\": 375,\n \"paymentMethod\": \"cash\",\n \"customerName\": \"Walk-in\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/pos/sales")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"_id\": \"6699aabbccddeeff00112233\",\n \"name\": \"Jollof rice\",\n \"price\": 2500,\n \"qty\": 2\n }\n ],\n \"discount\": 0,\n \"tax\": 375,\n \"paymentMethod\": \"cash\",\n \"customerName\": \"Walk-in\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"message": "<string>",
"data": {
"_id": "<string>",
"orderId": 123,
"shop": "<string>",
"user": "<string>",
"items": [
{
"_id": "<string>",
"name": "<string>",
"price": 123,
"quantity": 123,
"sku": "<string>",
"imageUrl": "<string>",
"itemType": "product"
}
],
"subtotal": 123,
"discount": 123,
"tax": 123,
"shippingCost": 123,
"status": "pending",
"source": "online",
"paymentMethod": "cash",
"posCustomerName": "<string>",
"posCustomerEmail": "<string>",
"posCustomerPhone": "<string>",
"additionalInfo": [
{
"label": "<string>",
"value": "<string>"
}
],
"payment": {
"_id": "<string>",
"status": "<string>",
"amount": 123,
"total": 123,
"channel": "<string>",
"provider": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Creates the same record the dashboard’s POS produces: source
pos, status paid, stock reduced for tracked items, and a completed payment attached. An app that already holds WRITE_ORDERS may use POST /orders/pos instead.Authorizations
Body
application/json
Response
The created sale.
Standard Salesive response envelope. The operation-specific payload is carried in data.
Was this page helpful?

