Points of Sale
Un point of sale (PoS) representa un punto de cobro. La recomendación es crear uno por vendedor (o por caja/dispositivo, según el modelo de negocio). Los QRs siempre se generan asociados a un point of sale.
Para crear un PoS necesitás el merchant_id y el subsidiary_id (ver Información del comercio).
Crear point of sale
POST https://api.geopagos.io/api/v4/points-of-sale
El SUBSIDIARY_ID y el MERCHANT_ID del body se obtienen desde el portal de SiPago.
curl --location 'https://api.geopagos.io/api/v4/points-of-sale' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data '{
"name": "point 3",
"description": "punto de venta point 3",
"reference": "subsidiary.{SUBSIDIARY_ID}",
"merchant_id": "{MERCHANT_ID}"
}'
Response — 200 OK
{
"uuid": "1ddddecf-3bfa-4dab-96db-607afe061a5c",
"name": "point 3",
"description": "punto de venta point 3",
"reference": "subsidiary.1739"
}
El campo uuid es el identificador del point of sale (point_of_sale_id). Guardalo: se usa para generar QRs y filtrar movimientos.
Actualizar point of sale
PUT https://api.geopagos.io/api/v4/points-of-sale/{point_of_sale_uuid}
curl --location --request PUT 'https://api.geopagos.io/api/v4/points-of-sale/{point_of_sale_uuid}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data '{
"name": "point 3 updated"
}'
Response — 200 OK
{
"uuid": "1ddddecf-3bfa-4dab-96db-607afe061a5c",
"name": "point 3 updated",
"description": "",
"reference": ""
}
Los campos no enviados vuelven vacíos (ver description y reference en el ejemplo). Enviá siempre el objeto completo si querés conservar los valores existentes.
Eliminar point of sale
DELETE https://api.geopagos.io/api/v4/points-of-sale/{point_of_sale_uuid}
Response — 204 No Content
Listar points of sale
GET https://api.prd.geopagos.io/api/v4/points-of-sale/
curl --location 'https://api.prd.geopagos.io/api/v4/points-of-sale/' \
--header 'Authorization: Bearer {access_token}' \
--header 'Accept: application/json'
Response — 200 OK
[
{
"uuid": "6fda9b64-d317-4723-9480-cda88579c987",
"name": "Federico kucher",
"description": "Point of sale for user kucherfederico@gmail.com",
"reference": "subsidiary.1739"
}
]
Siguiente paso: generar un QR.