Docs développeurs

Public API

Documentation complète pour intégrer utilisateurs, transactions, produits et fidélité avec Ro App.

Base URL https://api.roadcube.io/v1/p
Version v1
Endpoints 34

Démarrage

L’API publique Ro App permet d’intégrer la fidélité, l’inscription, les transactions, les produits et les coupons dans vos systèmes.

1

Obtenir un API Token

Demandez votre X-Api-Token unique à l’équipe Ro App.

2

Appels côté serveur

Toutes les requêtes doivent être faites depuis votre serveur — jamais depuis le navigateur de l’utilisateur.

3

JSON partout

Envoyez Content-Type: application/json et Accept: application/json à chaque appel.

Authorization

L’autorisation se fait via le header X-Api-Token.

Important : Tous les appels API doivent être faits côté serveur. Sinon le token peut être exposé et utilisé de façon malveillante.
Example headers
GET /v1/p/countries HTTP/1.1
Host: api.roadcube.io
Content-Type: application/json
Accept: application/json
X-Api-Token: YOUR_API_TOKEN

Format de réponse

Chaque réponse suit une enveloppe JSON cohérente :

Envelope
{
  "code": 200,
  "status": "success",
  "message": "MESSAGE_KEY",
  "data": {},
  "extra": [],
  "error": false
}
FieldTypeDescription
codenumberCode de statut de type HTTP
statusstringsuccess ou message d’erreur
messagestringClé de message (ex. USER_REGISTERED)
dataobject|arrayLe payload de la réponse
extraarrayMétadonnées supplémentaires
errorbooleanfalse en succès, true en erreur

Pays

Countries · 1 endpoints

GET /countries

Get the list

This action allows you to get a list of supported countries. This can be used if you need us to make the user's mobile verification in the "Init Registration" step.

cURL

curl -X GET 'https://api.roadcube.io/v1/p/countries' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN'

Response 200

ParameterRequiredDescription
phone_codeoptionalThis is the code that we are going to use when sending a sms to the end-user for verifying their mobile. ex. 0030
Example response
{
    "code": 200,
    "status": "success",
    "message": "COUNTRIES",
    "data": [
                {
                    "country_id": 1,
                    "name": "Greece",
                    "code": "GR",
                    "phone_code": "0030"
                },
                {
                    "country_id": 2,
                    "name": "United Kingdom",
                    "code": "UK",
                    "phone_code": "0044"
                },
            ]
    "extra": [],
    "error": false
}

Utilisateurs

Users · 16 endpoints

POST /users/registration/init

Initialize user's registration

This action allows you to initialize a user's registration process. Only two requests per 5 minutes can be made.

Request body

ParameterRequiredDescription
mobilerequiredThe user's mobile number ex. 6984040400
country_idnumberrequiredThe country ID that is related with the mobile number (Use 1 for Greek numbers) ex. 1
tosbooleanrequiredAccept the terms of service ex. true
verify_mobilebooleanrequiredDetermines if you need the mobile verification to be done from our side. If false, you can proceed with the last step of registration, which is the "Finalize Registration", otherwise the "Verify Mobile" step is needed to be done prior to "Finalize Registration". ex. false

Example request

{
  "mobile": "6984040400",
  "country_id": 1,
  "tos": true,
  "verify_mobile": false
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/registration/init' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "mobile": "6984040400",
  "country_id": 1,
  "tos": true,
  "verify_mobile": false
}'

Response 200

ParameterRequiredDescription
user_registration_identifieroptionalxo9v-dglf7f-063944` - Unique user's registration identifier that is going to be used for the whole registration process. ex. q0b5gj
Example response
{
  "code": 200,
  "status": "success",
  "message": "USER_REGISTERED",
  "data": {
    "user": {
      "user_registration_identifier": "q0b5gj-xo9v-dglf7f-063944",
      "mobile": "6984040400",
      "mobile_verification_code": "6861",
      "created_at": "2021-10-27T03:39:44.000000Z",
      "updated_at": "2021-10-27T03:39:44.000000Z",
      "country": {
        "country_id": 1,
        "name": "Greece",
        "code": "GR",
        "phone_code": "0030",
        "vat_percentage": "24",
        "currency": "EUR",
        "flag": "https://roadcube-files.s3.eu-central-1.amazonaws.com/images/info/countries/el.png",
        "active": true,
        "created_at": "2021-08-20T09:08:27.000000Z",
        "updated_at": "2021-08-20T09:08:27.000000Z",
        "deleted_at": null
      }
    }
  },
  "extra": [],
  "error": false
}
POST /users/registration/mobile-verification

Verify user's mobile

This action allows you to verify a user's mobile number.

Request body

ParameterRequiredDescription
user_registration_identifieroptionalxo9v-dglf7f-063944` (required) - The user's unique registration identifier ex. q0b5gj
mobile_verification_coderequiredThe mobile verification code that is being sent to the user's mobile ex. 1234

Example request

{
  "user_registration_identifier": "q0b5gj-xo9v-dglf7f-063944",
  "mobile_verification_code": "1234"
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/registration/mobile-verification' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user_registration_identifier": "q0b5gj-xo9v-dglf7f-063944",
  "mobile_verification_code": "1234"
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "MOBILE_VERIFICATION_SUCCESS",
  "data": [],
  "extra": [],
  "error": false
}
POST /users/registration/finalize

Finalize user's registration

This action allows you to complete a user's registration process.

Request body

ParameterRequiredDescription
user_registration_identifieroptionalxo9v-dglf7f-063944` (required) - The user's unique registration identifier ex. q0b5gj
genderstringrequiredThe user's gender (Allowed values: male, female, other) ex. male
passwordrequiredThe user's desired password ex. secretcode
password_confirmationrequiredVerify password ex. secretcode
birthdayoptional12-22` - The user's birth date ex. 1985
marketingbooleanrequiredUser allows to be notified through SMS, Push, and Email ex. true

Example request

{
  "user_registration_identifier": "q0b5gj-xo9v-dglf7f-063944",
  "gender": "male",
  "password": "secretcode",
  "password_confirmation": "secretcode",
  "birthday": "1985-12-22",
  "marketing": true
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/registration/finalize' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user_registration_identifier": "q0b5gj-xo9v-dglf7f-063944",
  "gender": "male",
  "password": "secretcode",
  "password_confirmation": "secretcode",
  "birthday": "1985-12-22",
  "marketing": true
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "USER_REGISTRATION_COMPLETED",
  "data": {
    "user_account": {
      "user_account_id": 2024,
      "app_provider_id": 1,
      "user_id": 1011,
      "full_name": null,
      "email": null,
      "gender": "male",
      "avatar": null,
      "birth_date": "1985-12-22",
      "mobile": "6984040400",
      "gdpr_settings": null,
      "referral": null,
      "lat": null,
      "lon": null,
      "source": null,
      "created_at": "2021-10-27T03:39:44.000000Z",
      "updated_at": "2021-10-27T03:41:56.000000Z",
      "active": true,
      "last_login_at": "2021-10-27T03:41:56.427737Z",
      "country": {
        "country_id": 1,
        "name": "Greece",
        "code": "GR",
        "phone_code": "0030",
        "vat_percentage": "24",
        "currency": "EUR",
        "flag": "https://roadcube-files.s3.eu-central-1.amazonaws.com/images/info/countries/el.png",
        "active": true,
        "created_at": "2021-08-20T09:08:27.000000Z",
        "updated_at": "2021-08-20T09:08:27.000000Z",
        "deleted_at": null
      }
    }
  },
  "extra": [],
  "error": false
}
POST /users/registration/email

User's registration by email

This action allows you to complete the user's registration with an email.

Request body

ParameterRequiredDescription
emailstringrequiredThe user's email ex. testemail@gmail.com
genderstringrequiredThe user's gender ex. male
passwordstringrequiredUser's password ex. secret
password_confirmationstringrequiredUser's password confirmed ex. secret
birthdayoptional01-01 (required, string, format: Y-m-d) - User's birth date ex. 1980
marketingbooleanrequiredIt shows if the user accepts to be contacted via Roadcube for marketing reasons. ex. true
full_namestringoptionalUser's full name ex. Nikos Papadopoulos

Example request

{
  "email": "testemail@gmail.com",
  "gender": "male",
  "password": "secret",
  "password_confirmation": "secret",
  "birthday": "1980-01-01",
  "full_name": "Nikos Papadopoulos",
  "maketing": true
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/registration/email' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "email": "testemail@gmail.com",
  "gender": "male",
  "password": "secret",
  "password_confirmation": "secret",
  "birthday": "1980-01-01",
  "full_name": "Nikos Papadopoulos",
  "maketing": true
}'

Response 200

ParameterRequiredDescription
user_registration_identifieroptionalydsk-aiwmue-044725` - Unique user's registration identifier that is going to be used ex. z7loox
mobileoptionalA six letter random string for user mobile. ex. 0io6pw
mobile_verification_codeoptionalThe mobile verification code should be empty on email registration. ex. null
countryoptionalAn object that includes some country information like country_id, name, code, phone_code, vat_percentage, currency, flag, active. ex. object
Example response
{
  "code": 200,
  "status": "success",
  "message": "USER_REGISTERED",
  "data": {
    "user": {
      "user_registration_identifier": "z7loox-ydsk-aiwmue-044725",
      "mobile": "0io6pw",
      "mobile_verification_code": null,
      "created_at": "2023-01-03T14:47:25.000000Z",
      "updated_at": "2023-01-03T14:47:25.000000Z",
      "country": {
        "country_id": 1,
        "name": "Greece",
        "code": "GR",
        "phone_code": "0030",
        "vat_percentage": "24",
        "currency": "EUR",
        "flag": "https://roadcube-files.s3.eu-central-1.amazonaws.com/images/info/countries/el.png",
        "active": true,
        "created_at": "2021-08-20T09:08:27.000000Z",
        "updated_at": "2021-08-20T09:08:27.000000Z",
        "deleted_at": null
      }
    }
  },
  "extra": [],
  "error": false
}
POST /users/points

Get user's points balance

This action allows you to get the user's current points balance. ### Tier Packages Explained: - **`current_package`**: The tier the user currently belongs to. Includes the expiration date of the tier (`expires_at`) and a `remaining_points` field *if the user is on the last tier*, which shows the points or amount required to **maintain** the current tier after expiration. - **`previous_package`**: The tier that is one level below the current one. Useful for reference or visual tier progression. May be `null` if the user is on the lowest tier. - **`next_package`**: The tier that is one level above the current one. If available, it includes a `remaining_points` field showing how many points or how much amount the user still needs in order to **upgrade** to the next tier.

Request body

ParameterRequiredDescription
userrequiredExample: The user's mobile or loyalty card number

Example request

{
  "user": "6904444444"
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/points' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user": "6904444444"
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "USER_POINTS",
  "data": {
    "current_balance": 61,
    "tiers": {
      "current_package": {
        "store_point_title_id": 332,
        "company_id": 2219,
        "from": 67,
        "to": -1,
        "title": {
          "el": "My tier 4",
          "en": "My tier 4",
          "it": "My tier 4"
        },
        "description": {
          "el": "My tier 4",
          "en": "My tier 4",
          "it": "My tier 4"
        },
        "color": "#982AE8",
        "created_at": "2025-04-04T09:45:53.000000Z",
        "updated_at": "2025-06-26T08:51:43.000000Z",
        "multiplier": "1.00",
        "expiration_days": 30,
        "valid_days_before": null,
        "expires_at": "2025-07-26 11:53:49",
        "remaining_points": 6
      },
      "previous_package": {
        "store_point_title_id": 331,
        "company_id": 2219,
        "from": 50,
        "to": 66,
        "title": {
          "el": "Νέο Επίπεδο 3",
          "en": "New Tier 3",
          "it": "Nuovo Livello 3"
        },
        "description": {
          "el": "Tier description 3",
          "en": "Tier description 3",
          "it": "Tier description 3"
        },
        "color": "#F8FEB4FF",
        "created_at": "2025-04-04T09:45:53.000000Z",
        "updated_at": "2025-06-26T08:51:43.000000Z",
        "multiplier": "1.00",
        "expiration_days": 30,
        "valid_days_before": 10
      },
      "next_package": null
    }
  },
  "extra": [],
  "error": false
}
POST /users/transactions/{

Get user's transactions

This action allows you to retrieve user's transactions + Parameters + page: 1 (optional, number) - The page of the coupon claims to return

Example request

{
  "mobile": "6391111213"
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/transactions/{' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "mobile": "6391111213"
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "USER_TRANSACTIONS",
  "data": {
    "transactions": [
      {
        "transaction_id": 5613034,
        "transaction_type_id": 6,
        "transaction_type_name": "Campaign Action",
        "transaction_status_id": 3,
        "transaction_status_name": "Verified",
        "transaction_payment_method_id": null,
        "transaction_payment_method_name": null,
        "total_points": 10,
        "total_price": 0,
        "delivery_fee": "0.00",
        "delivery_address": null,
        "total_amount": 0,
        "created_at": "2024-11-15T15:36:21.000000Z",
        "receipt_number": null,
        "user_identity": "6391111213",
        "currency": "€",
        "clearer": "In Store",
        "transaction_items": [
          {
            "product_id": 7130,
            "product_name": "Virtual",
            "price": 0,
            "points": 0,
            "quantity": 1,
            "total_row_price": 0,
            "total_row_points": 0,
            "reward_type_id": 2,
            "reward_points": 2,
            "total_litres": 0,
            "reward_points_shared": false,
            "reward_points_shared_options": {
              "online": false,
              "offline": false
            },
            "currency": "€"
          }
        ],
        "store": {
          "name": "63785-RoadCube",
          "logo": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/stores/SJtJKficZIRcHT0cgTpm20210820122721.png",
          "address": "Agias Glikerias 5, Galatsi 111 46"
        },
        "campaign": {
          "campaign_id": 574,
          "title": "test user account characteristic"
        }
      },
      {
        "transaction_id": 5612222,
        "transaction_type_id": 6,
        "transaction_type_name": "Campaign Action",
        "transaction_status_id": 3,
        "transaction_status_name": "Verified",
        "transaction_payment_method_id": null,
        "transaction_payment_method_name": null,
        "total_points": 1000,
        "total_price": 0,
        "delivery_fee": "0.00",
        "delivery_address": null,
        "total_amount": 0,
        "created_at": "2024-09-25T08:18:37.000000Z",
        "receipt_number": null,
        "user_identity": "6391111213",
        "currency": "€",
        "clearer": "In Store",
        "transaction_items": [
          {
            "product_id": 7130,
            "product_name": "Virtual",
            "price": 0,
            "points": 1000,
            "quantity": 1,
            "total_row_price": 0,
            "total_row_points": 1000,
            "reward_type_id": 2,
            "reward_points": 2,
            "total_litres": 0,
            "reward_points_shared": false,
            "reward_points_shared_options": {
              "online": false,
              "offline": false
            },
            "currency": "€"
          }
        ],
        "store": {
          "name": "63785-RoadCube",
          "logo": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/stores/SJtJKficZIRcHT0cgTpm20210820122721.png",
          "address": "Agias Glikerias 5, Galatsi 111 46"
        },
        "campaign": []
      }
    ],
    "pagination": {
      "total": 2,
      "total_pages": 1,
      "previous_page": null,
      "current_page": 1,
      "next_page": null,
      "items_per_page": 12,
      "displayed": 2
    }
  },
  "extra": [],
  "error": false
}
POST /users/profile

Get user's profile

This action allows you to retrieve user's profile.

Request body

ParameterRequiredDescription
userrequiredThe user's mobile number or loyalty card ex. 6933333333

Example request

{
  "user": "6933333333"
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/profile' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user": "6933333333"
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "USER_PROFILE",
  "data": {
    "user_id": 152365,
    "user_account_id": 152766,
    "mobile": "6933333333",
    "full_name": "test test",
    "email": "newemail@email.com",
    "gender": null,
    "birth_date": null,
    "country_id": 1
  },
  "extra": [],
  "error": false
}
PUT /users/profile

Update user's profile

This action allows you to update user's profile.

Request body

ParameterRequiredDescription
userrequiredThe user's mobile number or loyalty card ex. 6984040400
full_nameoptionalThe user's full name ex. John Doe
emailoptionalThe user's email ex. demo@demo.com
genderoptionalThe user's gender (in: male, female, other) ex. male
birth_dateoptional12-25` - The user's birth date (Y-m-d) ex. 1985
passwordoptionalThe user's password ex. secret

Example request

{
  "user": "6933333333",
  "full_name": "test test",
  "email": "newemail@email.com"
}

cURL

curl -X PUT 'https://api.roadcube.io/v1/p/users/profile' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user": "6933333333",
  "full_name": "test test",
  "email": "newemail@email.com"
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "USER_PROFILE",
  "data": {
    "mobile": "6933333333",
    "full_name": "test test",
    "email": "newemail@email.com",
    "gender": null,
    "birth_date": null,
    "country_id": 1
  },
  "extra": [],
  "error": false
}
POST /users/coupons-to-claim/{

Get user's available coupons to claim

This action allows you to get the user's available coupons to claim based on the user's points current balance.

Request body

ParameterRequiredDescription
userrequiredExample: The user's mobile or loyalty card number

Example request

{
  "user": "6933333333"
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/coupons-to-claim/{' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user": "6933333333"
}'

Response 200

ParameterRequiredDescription
coupon_idoptionalExample: This is the value that is going to be used in the "New Coupon Claim" step, where a new coupon claim action can be done for a user.
Example response
{
  "code": 200,
  "status": "success",
  "message": "COUPONS_TO_CLAIM",
  "data": {
    "coupons": [
      {
        "coupon_id": 1113,
        "title": "test expire",
        "description": "test expire",
        "points": 9,
        "cost": "9.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1116,
        "title": "test no image",
        "description": "test no image",
        "points": 1,
        "cost": "1.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1130,
        "title": "test dim p",
        "description": "test dim p",
        "points": 20,
        "cost": "10.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1102,
        "title": "All voucher",
        "description": "All voucher",
        "points": 1,
        "cost": "1.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1103,
        "title": "Green Voucher",
        "description": "Green Voucher",
        "points": 2,
        "cost": "20.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1104,
        "title": "Yellow Voucher",
        "description": "Yellow Voucher",
        "points": 2,
        "cost": "20.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1107,
        "title": "Green New",
        "description": "Green New",
        "points": 2,
        "cost": "10.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1109,
        "title": "Silver Product",
        "description": "Silver Product",
        "points": 2,
        "cost": "30.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      }
    ],
    "pagination": {
      "total": 8,
      "total_pages": 1,
      "previous_page": null,
      "current_page": 1,
      "next_page": null,
      "items_per_page": 12,
      "displayed": 8
    }
  },
  "extra": [],
  "error": false
}
POST /users/coupon-claims

New coupon claim

This action allows you to make a new coupon claim for the user. A "coupon claim" is the action of exchanging a user's points for a coupon. After this action is done, the coupon claim is available for X days (based on company settings) before being redeemed. After that timeframe, the coupon claim cannot be redeemed by the user.

Request body

ParameterRequiredDescription
userrequiredThe user's mobile or loyalty card number ex. 6904242422
coupon_idnumberrequiredCoupon's unique ID. It can be found from "Available coupons to claim" step. ex. 1
notifybooleanoptionalIf value is false it will not notify user about new coupon claim with the voucher code. ex. false

Example request

{
  "user": "6904444444",
  "coupon_id": 1116
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/coupon-claims' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user": "6904444444",
  "coupon_id": 1116
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "COUPON_CLAIMED",
  "data": {
    "coupon_id": 1116,
    "title": "test no image",
    "description": "test no image",
    "voucher": "757641021425",
    "image": null,
    "points": 1,
    "cost": "1.00",
    "expires_in_days": 60
  },
  "extra": [],
  "error": false
}
POST /users/user-coupon-claims{?q={q}&redeemed={redeemed}

Get user's coupon claims

This action allows you to get the user's claimed coupons.

Query parameters

ParameterRequiredDescription
qoptionalQuery parameter: q
redeemedoptionalQuery parameter: redeemed

Request body

ParameterRequiredDescription
userrequiredThe user's mobile or loyalty card number ex. 6904242422

Example request

{
  "user": "6904444444"
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/user-coupon-claims{?q={q}&redeemed={redeemed}' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user": "6904444444"
}'

Response 200

ParameterRequiredDescription
redeemedbooleanoptionalIf the coupon claim has already been redeemed ex. false
voucheroptionalThe unique code that must be used for the redemption step (New redemption step) ex. 12345678
expires_in_daysnumberoptionalHow many days have left until the coupon claim's expiration ex. 25
Example response
{
  "code": 200,
  "status": "success",
  "message": "USER_COUPON_CLAIMS",
  "data": {
    "user_gifts": [
      {
        "title": "demo demo",
        "description": "demo demo",
        "image": null,
        "points": 1,
        "voucher": "12345678",
        "redeemed": false,
        "expires_in_days": 25,
        "coupon_id": 1113
      }
    ],
    "pagination": {
      "total": 1,
      "total_pages": 1,
      "previous_page": null,
      "current_page": 1,
      "next_page": null,
      "items_per_page": 12,
      "displayed": 1
    }
  },
  "extra": [],
  "error": false
}
POST /users/attach-mobile/init

Attach Mobile (Step 1)

Attach a mobile to an email user.

Request body

ParameterRequiredDescription
emailrequiredThe user's email ex. antonis5@roadcube.com
mobilerequiredThe mobile ex. 6975412356

Example request

{
  "email": "antonis5@roadcube.com",
  "mobile": "6975412356"
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/attach-mobile/init' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "email": "antonis5@roadcube.com",
  "mobile": "6975412356"
}'

Response 200

ParameterRequiredDescription
email_mobile_identifieroptionalattach-mobile:0y4mgo:1678443713` (string) - The identifier to use for step 2 ex. pub
Example response
{
  "code": 200,
  "status": "success",
  "message": "MOBILE_VERIFICATION_PENDING",
  "data": {
    "email_mobile_identifier": "pub-attach-mobile:0y4mgo:1678443713"
  },
  "extra": [],
  "error": false
}
POST /users/attach-mobile/verification

Attach Mobile (Step 2)

Attach a mobile to an email user, final step.

Request body

ParameterRequiredDescription
email_mobile_identifieroptionalattach-mobile:0y4mgo:1678443713` (required) - The identifier ex. pub
mobile_verification_coderequiredThe mobile verification code ex. 2776

Example request

{
  "email_mobile_identifier": "pub-attach-mobile:0y4mgo:1678443713",
  "mobile_verification_code": 2776
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/attach-mobile/verification' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "email_mobile_identifier": "pub-attach-mobile:0y4mgo:1678443713",
  "mobile_verification_code": 2776
}'

Response 200

ParameterRequiredDescription
user_account_idstringoptionalThe user account of user ex. 147122
Example response
{
  "code": 200,
  "status": "success",
  "message": "EMAIL_MOBILE_ASSOCIATION_DONE",
  "data": {
    "user_account_id": 147122,
    "app_provider_id": 1,
    "user_id": 146839,
    "country_id": 1,
    "county_id": null,
    "language_id": 1,
    "mobile": "6975412358",
    "mobile_verification_code": null,
    "mobile_verified_at": "2023-03-10 12:22:19",
    "full_name": null,
    "email": "antonis5@roadcube.com",
    "email_2": null,
    "gender": null,
    "avatar": null,
    "referral": null,
    "lat": null,
    "lon": null,
    "birth_date": null,
    "source": null,
    "preregister": false,
    "created_via_transaction": false,
    "company_information": {
      "city": "",
      "email": "antonis5@roadcube.com",
      "phone": "",
      "gender": "male",
      "mobile": "6975412358",
      "address": "",
      "zipcode": "",
      "store_id": "",
      "county_id": "",
      "form_date": "2023-03-10",
      "last_name": "",
      "birth_date": "1985-10-27",
      "country_id": 1,
      "first_name": "",
      "user_address_id": ""
    },
    "is_customer": true,
    "active": false,
    "last_login_at": null,
    "remember_token": null,
    "created_at": "2023-03-10T10:20:02.000000Z",
    "updated_at": "2023-03-10T10:22:19.000000Z",
    "deleted_at": null,
    "init_bonus_received": null,
    "amka": null,
    "username": null,
    "user": {
      "user_id": 146839,
      "country_id": 1,
      "user_registration_identifier": "0dx8fj-uvka-e44o68-122002",
      "mobile": "6975412358",
      "mobile_verification_code": null,
      "mobile_verified_at": "2023-03-10 12:22:19",
      "confirmed": true,
      "sms_count": 0,
      "created_at": "2023-03-10T10:20:02.000000Z",
      "updated_at": "2023-03-10T10:22:19.000000Z",
      "deleted_at": null,
      "old_user_id": null
    }
  },
  "extra": [],
  "error": false
}
POST /users/attach-mobile/without-verification

Attach Mobile without Verification

Attach a mobile to an email user without mobile verification.

Request body

ParameterRequiredDescription
emailrequiredThe user's email ex. publictest2@public.com
mobilerequiredThe mobile ex. 6919999934

Example request

{
  "email": "publictest2@public.com",
  "mobile": "6919999934"
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/attach-mobile/without-verification' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "email": "publictest2@public.com",
  "mobile": "6919999934"
}'

Response 200

ParameterRequiredDescription
user_account_idstringoptionalThe user account of user ex. 146926
Example response
{
  "code": 200,
  "status": "success",
  "message": "EMAIL_MOBILE_ASSOCIATION_DONE",
  "data": {
    "user_id": 146926,
    "mobile": "6919999934",
    "user_accounts": [
      {
        "user_account_id": 147240,
        "app_provider_id": 1,
        "mobile": "6919999934",
        "email": "publictest2@public.com",
        "company_information": {
          "city": "",
          "email": "publictest2@public.com",
          "phone": "",
          "gender": "male",
          "mobile": 6919999934,
          "address": "",
          "zipcode": "",
          "store_id": "",
          "county_id": "",
          "form_date": "2024-05-20",
          "last_name": "",
          "birth_date": "1980-01-01",
          "country_id": 1,
          "first_name": "",
          "user_address_id": ""
        }
      }
    ]
  },
  "extra": [],
  "error": false
}
POST /users/otp-create

Create OTP

Create an OTP for user.

Request body

ParameterRequiredDescription
mobilerequiredThe mobile ex. 6919999934

Example request

{
  "mobile": "6919999934"
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/otp-create' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "mobile": "6919999934"
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "OTP_CREATED",
  "data": {
    "user_identifier": "2eb462fb-8bff-40a9-9908-52fd0162feb2"
  },
  "extra": [],
  "error": false
}
POST /users/otp-validate

Validate OTP

Attach a mobile to an email user without mobile verification.

Request body

ParameterRequiredDescription
user_identifieroptional47d4-41c6-8de1-4ce760cd97f5` (required) - The identifier from create request ex. d0b795d5
otprequiredThe otp sent to user ex. 4253

Example request

{
  "user_identifier": "d0b795d5-47d4-41c6-8de1-4ce760cd97f5",
  "otp": 4253
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/users/otp-validate' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user_identifier": "d0b795d5-47d4-41c6-8de1-4ce760cd97f5",
  "otp": 4253
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "OTP_VALIDATED",
  "data": {
    "valid": true
  },
  "extra": [],
  "error": false
}

Transactions

Transactions · 6 endpoints

POST /stores/{store_id}/transactions/preview

Preview transaction - Amount Case

This action allows you to preview a transaction with amount before made.

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

Request body

ParameterRequiredDescription
userrequiredThe transaction's user's mobile number or loyalty card number ex. 6984040400
amountrequiredThe transaction's total amount (Greater than 0) ex. 100

Example request

{
  "user": "6984040400",
  "amount": "100"
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/stores/{store_id}/transactions/preview' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user": "6984040400",
  "amount": "100"
}'

Response 200

ParameterRequiredDescription
current_user_pointsoptionalUser's current points ex. 1159
new_user_pointsoptionalUser's new points if the transaction be made ex. 1359
total_amountoptionalTransaction's total amount ex. 100
final_amountoptionalTransaction's final amount includes delivery cost if needed ex. 100
won_pointsoptionalThe user will win such an amount of points if the transaction be made ex. 200
coupon_idnumberoptionalThe Coupon's ID ex. 1
store_idnumberoptionalThe Store's ID ex. 100
enoptionalThe coupon's title (in English) ex. Coffee of your choice
eloptionalThe coupon's title (in Greek) ex. Ένας καφές της επιλογής σας
itoptionalThe coupon's title (in Italian) ex. Un caffè a scelta
enoptionalThe coupon's description (in English) ex. Choose between various types of coffee
eloptionalThe coupon's description (in English) ex. Επιλέξτε ανάμεσα σε διάφορα είδη καφέ
itoptionalThe coupon's description (in English) ex. Scegli tra vari tipi di caffè
imageoptionalstage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png` - The coupon's image ex. https://roadcube
coupon_idnumberoptionalThe Coupon's ID ex. 2
store_idnumberoptionalThe Store's ID ex. 100
enoptionalThe coupon's title (in English) ex. Sandwich
eloptionalThe coupon's title (in Greek) ex. Ένας σάντουιτς
itoptionalThe coupon's title (in Italian) ex. Un panino
enoptionalThe coupon's description (in English) ex. Cheese, Ham
eloptionalThe coupon's description (in English) ex. Τυρί, Ζαμπόν
itoptionalThe coupon's description (in English) ex. formaggio, prosciutto
imageoptionalstage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png` - The coupon's image ex. https://roadcube
coupon_idnumberoptionalThe Coupon's ID ex. 3
store_idnumberoptionalThe Store's ID ex. 100
enoptionalThe coupon's title (in English) ex. 25 Euro Gift voucher
eloptionalThe coupon's title (in Greek) ex. Δωροεπιταγή αξίας 25 ευρώ
itoptionalThe coupon's title (in Italian) ex. Buono regalo del valore di 25 euro
enoptionalThe coupon's description (in English) ex. 25 Euro Gift voucher
eloptionalThe coupon's description (in English) ex. Δωροεπιταγή αξίας 25 ευρώ
itoptionalThe coupon's description (in English) ex. Buono regalo del valore di 25 euro
imageoptionalstage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png` - The coupon's image ex. https://roadcube
Example response
{
  "code": 200,
  "status": "success",
  "message": "TRANSACTION_PREVIEW",
  "data": {
    "current_user_points": 1159,
    "new_user_points": 1359,
    "total_amount": 100,
    "final_amount": 100,
    "won_points": 200,
    "sampling_coupons": [
      {
        "coupon_id": 1068,
        "store_id": 381,
        "title": {
          "el": "test",
          "en": "test",
          "it": "test"
        },
        "description": {
          "el": "test",
          "en": "test",
          "it": "test"
        },
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      }
    ],
    "general_coupon_claims": [],
    "coupon_claims_for_use": []
  },
  "extra": [],
  "error": false
}
POST /stores/{store_id}/transactions/preview

Preview transaction - Products Case

This action allows you to preview a transaction with products before made. <strong>Information:</strong><br/> If we want to send custom points on request we need to use 2 attributes on request 1) <strong>"custom_points_provided"</strong>, with a value "true", let us use the second attribute in order to specify the custom points 2) <strong>"custom_points"</strong>, with an integer number. The value of the points we want for the transaction

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

Request body

ParameterRequiredDescription
userrequiredThe transaction's user's mobile number or loyalty card number ex. 6933333333
custom_points_providedbooleanoptionalFlag must be true if we are going to use custom points ex. true
custom_pointsnumberoptionalCustom points for transaction if custom_points_provided flag is true ex. 5
product_idnumberrequiredThe product's ID ex. 1561
retail_pricenumberrequiredIt's being used for end-user's reward points calculation, when the reward type is either "Euro" or "Liter". You could send "1" as value, when it is not needed. ex. 1
quantitynumberrequiredIt's being used for end-user's reward points calculation, when the reward type is "Item". You could send "1" as value, when it is not needed. ex. 1

Example request

{
  "user": "6933333333",
  "custom_points_provided": true,
  "custom_points": 5,
  "products": [
    {
      "product_id": 1561,
      "retail_price": 1,
      "quantity": 1
    }
  ]
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/stores/{store_id}/transactions/preview' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user": "6933333333",
  "custom_points_provided": true,
  "custom_points": 5,
  "products": [
    {
      "product_id": 1561,
      "retail_price": 1,
      "quantity": 1
    }
  ]
}'

Response 200

ParameterRequiredDescription
current_user_pointsoptionalUser's current points ex. 2089
new_user_pointsoptionalUser's new points if the transaction be made ex. 2094
total_amountoptionalTransaction's total amount ex. 6
final_amountoptionalTransaction's final amount includes delivery cost if needed ex. 6
won_pointsoptionalThe user will win such an amount of points if the transaction be made ex. 5
Example response
{
  "code": 200,
  "status": "success",
  "message": "TRANSACTION_PREVIEW",
  "data": {
    "current_user_points": 2089,
    "new_user_points": 2094,
    "total_amount": 6,
    "final_amount": 6,
    "won_points": 5,
    "sampling_coupons": [],
    "general_coupon_claims": [],
    "coupon_claims_for_use": []
  },
  "extra": [],
  "error": false
}
POST /stores/{store_id}/transactions/new

New transaction - Amount

This action allows you to create a transaction with a fixed amount.

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

Request body

ParameterRequiredDescription
userrequiredThe transaction's user's mobile number or loyalty card number ex. 6984040400
amountoptionalThe transaction's total amount (Greater than 0) ex. 100
custom_points_providedbooleanoptionalFlag must be true if we are going to use custom points ex. true
custom_pointsnumberoptionalCustom points for transaction if custom points provided flag is true ex. 5

Example request

{
  "user": "6984040400",
  "amount": "100",
  "custom_points_provided": true,
  "custom_points": 5
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/stores/{store_id}/transactions/new' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user": "6984040400",
  "amount": "100",
  "custom_points_provided": true,
  "custom_points": 5
}'

Response 200

ParameterRequiredDescription
total_pointsnumberoptionalTransaction's total points ex. 400
total_pricenumberoptionalTransaction's total price ex. 200
delivery_feeoptionalTransaction's delivery fee ex. 0
nameoptionalTransaction's store's name ex. Coffee Stars
addressoptionalTransaction's store's address ex. Leoforos Posidonos 18
primary_phoneoptionalTransaction's store's primary phone ex. 2106789000
logooptionalstage-files.s3.eu-central-1.amazonaws.com/images/stores/hg3Bh6E8KNyUPpumKGZ320210820122816.png` - Transaction's store's logo url ex. https://roadcube
nameoptionalTransaction's store's company's name ex. Roadcube
logooptionalstage-files.s3.eu-central-1.amazonaws.com/images/stores/SJtJKficZIRcHT0cgTpm20210820122721.png` - Transaction's store's company's logo url ex. https://roadcube
points_labeloptionalTransaction's store's company's loyalty program's points label ex. Moves
Example response
{
  "code": 200,
  "status": "success",
  "message": "TRANSACTION_CREATED",
  "data": {
    "transaction_id": 5407591,
    "total_points": 2,
    "total_price": 1,
    "store": {
      "name": "AUTO REPAIR SERVICE",
      "address": "ΠΕΡΙΚΛΕΟΥΣ 37 ΠΕΡΙΣΤΕΡΙ",
      "primary_phone": "2105062501",
      "logo": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/stores/SJtJKficZIRcHT0cgTpm20210820122721.png"
    },
    "company": {
      "name": "63785-RoadCube",
      "logo": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/stores/SJtJKficZIRcHT0cgTpm20210820122721.png",
      "points_label": "moves"
    }
  },
  "extra": [],
  "error": false
}
POST /stores/{store_id}/transactions/new

New transaction - Products

This action allows you to create a new transaction with products. <strong>Information:</strong><br/> If we want to send custom points on request we need to use 2 attributes on request 1) <strong>"custom_points_provided"</strong>, with a value "true", let us use the second attribute in order to specify the custom points 2) <strong>"custom_points"</strong>, with an integer number. The value of the points we want for the transaction

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

Request body

ParameterRequiredDescription
userrequiredThe transaction's user's mobile number or loyalty card number ex. 6933333333
custom_points_providedbooleanoptionalFlag must be true if we are going to use custom points ex. true
custom_pointsnumberoptionalCustom points for transaction if custom points provided flag is true ex. 5
product_idnumberrequiredThe product's ID ex. 1561
retail_pricenumberrequiredIt's being used for end-user's reward points calculation, when the reward type is either "Euro" or "Liter". You could send "1" as value, when it is not needed. ex. 1
quantitynumberrequiredIt's being used for end-user's reward points calculation, when the reward type is "Item". You could send "1" as value, when it is not needed. ex. 1

Example request

{
  "user": "6933333333",
  "custom_points_provided": true,
  "custom_points": 5,
  "products": [
    {
      "product_id": 1561,
      "retail_price": 1,
      "quantity": 1
    }
  ]
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/stores/{store_id}/transactions/new' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "user": "6933333333",
  "custom_points_provided": true,
  "custom_points": 5,
  "products": [
    {
      "product_id": 1561,
      "retail_price": 1,
      "quantity": 1
    }
  ]
}'

Response 200

ParameterRequiredDescription
transaction_idnumberoptionalTransaction's id ex. 5407677
total_pointsnumberoptionalTransaction's total points ex. 5
total_pricenumberoptionalTransaction's total price ex. 6
nameoptionalTransaction's store's name ex. AUTO REPAIR SERVICE
addressoptionalTransaction's store's address ex. ΠΕΡΙΚΛΕΟΥΣ 37 ΠΕΡΙΣΤΕΡΙ
primary_phoneoptionalTransaction's store's primary phone ex. 2105062501
logooptionalstage-files.s3.eu-central-1.amazonaws.com/images/stores/SJtJKficZIRcHT0cgTpm20210820122721.png` - Transaction's store's logo url ex. https://roadcube
nameoptionalRo App` - Transaction's store's company's name ex. 63785
logooptionalstage-files.s3.eu-central-1.amazonaws.com/images/stores/SJtJKficZIRcHT0cgTpm20210820122721.png` - Transaction's store's company's logo url ex. https://roadcube
points_labeloptionalTransaction's store's company's loyalty program's points label ex. moves
Example response
{
  "code": 200,
  "status": "success",
  "message": "TRANSACTION_CREATED",
  "data": {
    "transaction_id": 5407677,
    "total_points": 5,
    "total_price": 6,
    "store": {
      "name": "AUTO REPAIR SERVICE",
      "address": "ΠΕΡΙΚΛΕΟΥΣ 37 ΠΕΡΙΣΤΕΡΙ",
      "primary_phone": "2105062501",
      "logo": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/stores/SJtJKficZIRcHT0cgTpm20210820122721.png"
    },
    "company": {
      "name": "63785-RoadCube",
      "logo": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/stores/SJtJKficZIRcHT0cgTpm20210820122721.png",
      "points_label": "moves"
    }
  },
  "extra": [],
  "error": false
}
GET /stores/{store_id}/transactions?page={page}&q={q}&p={p}

Get store's transaction

This action allows you to retrieve the transactions of a store.

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

Query parameters

ParameterRequiredDescription
pageoptionalQuery parameter: page
qoptionalQuery parameter: q
poptionalQuery parameter: p

cURL

curl -X GET 'https://api.roadcube.io/v1/p/stores/{store_id}/transactions?page={page}&q={q}&p={p}' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN'

Response 200

ParameterRequiredDescription
transaction_statusstringoptionalTransaction's status ex. Verified
total_pointsnumberoptionalTransaction's total points ex. 400
total_pricenumberoptionalTransaction's total price ex. 200
nameoptionalTransaction's store's name ex. Coffee Stars
addressoptionalTransaction's store's address ex. Leoforos Posidonos 18
primary_phoneoptionalTransaction's store's primary phone ex. 2106789000
logooptionalstage-files.s3.eu-central-1.amazonaws.com/images/stores/hg3Bh6E8KNyUPpumKGZ320210820122816.png` - Transaction's store's logo url ex. https://roadcube
full_nameoptionalTransaction's user's full name ex. John Doe
mobileoptionalTransaction's user's mobile number ex. 6904242422
genderoptionalTransaction's user's gender ex. male
totalnumberoptionalTotal results (without pagination applied) ex. 1
total_pagesnumberoptionalHow many pages the pagination returns ex. 1
previous_pagenumberoptionalThe pagination's previous page number (CAN BE NULL if there is no previous page) ex. 1
current_pagenumberoptionalThe pagination's current page number ex. 1
next_pagenumberoptionalThe pagination's next page number (CAN BE NULL if there is no next page) ex. 1
items_per_pagenumberoptionalHow many items returns each page ex. 12
displayednumberoptionalHow many items are being displayed ex. 1
Example response
{
  "code": 200,
  "status": "success",
  "message": "STORE_TRANSACTIONS",
  "data": {
    "transactions": [
      {
        "transaction_id": 5407544,
        "transaction_status": "Verified",
        "total_points": 4,
        "total_price": 1,
        "created_at": "2023-01-04T12:46:08.000000Z",
        "currency": "€",
        "store": {
          "name": "AUTO REPAIR SERVICE",
          "logo": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/stores/SJtJKficZIRcHT0cgTpm20210820122721.png",
          "primary_phone": "2105062501",
          "address": "ΠΕΡΙΚΛΕΟΥΣ 37 ΠΕΡΙΣΤΕΡΙ"
        },
        "user": {
          "full_name": "test test",
          "mobile": "6933333333",
          "gender": null
        }
      },
      {
        "transaction_id": 5407543,
        "transaction_status": "Verified",
        "total_points": 4,
        "total_price": 3,
        "created_at": "2023-01-04T12:45:08.000000Z",
        "currency": "€",
        "store": {
          "name": "AUTO REPAIR SERVICE",
          "logo": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/stores/SJtJKficZIRcHT0cgTpm20210820122721.png",
          "primary_phone": "2105062501",
          "address": "ΠΕΡΙΚΛΕΟΥΣ 37 ΠΕΡΙΣΤΕΡΙ"
        },
        "user": {
          "full_name": "test test",
          "mobile": "6933333333",
          "gender": null
        }
      }
    ],
    "pagination": {
      "total": 2,
      "total_pages": 1,
      "previous_page": null,
      "current_page": 1,
      "next_page": null,
      "items_per_page": 12,
      "displayed": 2
    }
  },
  "extra": [],
  "error": false
}
POST /stores/{store_id}/transactions/cancel

Cancel

This action allows you to cancel an offline transaction of a store.

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

Request body

ParameterRequiredDescription
transaction_idrequiredThe transaction you need to cancel ex. 1234

cURL

curl -X POST 'https://api.roadcube.io/v1/p/stores/{store_id}/transactions/cancel' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "CANCELED_OFFLINE_TRANSACTION",
  "data": {
    "transaction_id": 1930214,
    "store_id": 153,
    "total_points": 67,
    "total_price": "-64.00",
    "transaction_items": [
      {
        "el": "Unleaded Crystal Next",
        "en": "Unleaded Crystal Next",
        "it": "Unleaded Crystal Next"
      }
    ]
  },
  "extra": [],
  "error": false
}

Échanges

Redemptions · 3 endpoints

GET /stores/{store_id}/redemptions?page={page}

Get store's redemptions

This action allows you to retrieve a store's redemptions.

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

Query parameters

ParameterRequiredDescription
pageoptionalQuery parameter: page

Request body

ParameterRequiredDescription
store_idrequiredThe store for which you need to get its redemptions ex. 100
pagerequiredThe page number of the pagination ex. 1

cURL

curl -X GET 'https://api.roadcube.io/v1/p/stores/{store_id}/redemptions?page={page}' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN'

Response 200

ParameterRequiredDescription
promo_type_nameoptionalThe voucher's promo type ex. Gift Voucher
gift_titleoptionalGift's title ex. 5 Euro
gift_titleoptionalproduction-files.s3.eu-central-1.amazonaws.com/images/coupons/4LAHVfGPmx3oo6EH2VAb20210906054654.jpg` - Gift's image ex. https://roadcube
pointsnumberoptionalGift's needed points for a user to claim it ex. 500
total_claimednumberoptionalHow many coupon claims have occured for this coupon ex. 100
total_redeemednumberoptionalHow many coupon claims have been redeemed ex. 3
availablenumberoptionalHow many coupon claims can still happen ex. 1000000
totalnumberoptionalTotal results (without pagination applied) ex. 1
total_pagesnumberoptionalHow many pages the pagination returns ex. 1
previous_pagenumberoptionalThe pagination's previous page number (CAN BE NULL if there is no previous page) ex. 1
current_pagenumberoptionalThe pagination's current page number ex. 1
next_pagenumberoptionalThe pagination's next page number (CAN BE NULL if there is no next page) ex. 1
items_per_pagenumberoptionalHow many items returns each page ex. 12
displayednumberoptionalHow many items are being displayed ex. 1
Example response
{
  "code": 200,
  "status": "success",
  "message": "REDEEMED_COUPONS_RETRIEVED",
  "data": {
    "redemptions": [
      {
        "promo_type_name": "Gift Voucher",
        "gift_title": "5 Ευρώ",
        "gift_image": "https://roadcube-production-files.s3.eu-central-1.amazonaws.com/images/coupons/4LAHVfGPmx3oo6EH2VAb20210906054654.jpg",
        "points": 1500,
        "total_claimed": 81,
        "total_redeemed": 1,
        "available": 999999500
      }
    ],
    "pagination": {
      "total": 1,
      "total_pages": 1,
      "previous_page": null,
      "current_page": 1,
      "next_page": null,
      "items_per_page": "12",
      "displayed": 1
    }
  },
  "extra": [],
  "error": false
}
POST /redeems

New redemption

This action allows you to redeem a claimed coupon.

Request body

ParameterRequiredDescription
voucherrequiredThe unique code a user possess ex. 96560774
store_idnumberrequiredThe store in which the coupon is going to be redeemed ex. 1090

Example request

{
  "voucher": "96560774",
  "store_id": 1090
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/redeems' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "voucher": "96560774",
  "store_id": 1090
}'

Response 200

ParameterRequiredDescription
titleoptionalRedeemed coupon's title ex. Pizza
descriptionoptionalRedeemed coupon's description ex. Pizza Margarita
imageoptionalstage-files.s3.eu-central-1.amazonaws.com/images/coupons/wEJK4fFzgfTvnmefoVDE20210820125216.png` - Redeemed coupon's image ex. https://roadcube
costoptionalThe cost of the coupon. If not exist then its null ex. 10
cost_typeoptionalThe cost type of the coupon. "amount", "percentage" or null are the available responses ex. amount
Example response
{
  "code": 200,
  "status": "success",
  "message": "COUPON_REDEEMED_SUCCESSFULLY",
  "data": {
    "title": "pizza",
    "description": "pizza margarita",
    "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/coupons/wEJK4fFzgfTvnmefoVDE20210820125216.png",
    "cost": 10,
    "cost_type": "amount"
  },
  "extra": [],
  "error": false
}
POST /redeems/validate

Validate a voucher code

This action allows you to validate a voucher before redemption.

Request body

ParameterRequiredDescription
voucherrequiredThe unique code a user possesses. ex. 96560774
store_idnumberoptionalThe store id, optional parameter. ex. 234

Example request

{
  "voucher": "96560774",
  "store_id": 234
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/redeems/validate' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "voucher": "96560774",
  "store_id": 234
}'

Response 200

ParameterRequiredDescription
validoptionalIf the voucher code is valid and can be redeemed, it returns true, otherwise false is returned ex. true
titleoptionalRedeemed coupon's title ex. Pizza
descriptionoptionalRedeemed coupon's description ex. Pizza Margarita
imageoptionalstage-files.s3.eu-central-1.amazonaws.com/images/coupons/wEJK4fFzgfTvnmefoVDE20210820125216.png` - Redeemed coupon's image ex. https://roadcube
costoptionalThe cost of the coupon. If not exist then its null ex. 10
cost_typeoptionalThe cost type of the coupon. "amount", "percentage" or null are the available responses ex. amount
Example response
{
  "code": 200,
  "status": "success",
  "message": "VALIDATION_RESULTS",
  "data": {
    "valid": true,
    "coupon": {
      "title": "pizza",
      "description": "pizza margarita",
      "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/coupons/wEJK4fFzgfTvnmefoVDE20210820125216.png",
      "cost": 10,
      "cost_type": "amount"
    }
  },
  "extra": [],
  "error": false
}

Produits

Products · 4 endpoints

GET /stores/{store_id}/products{?q={q}&sku={sku}

Get store's products

This action allows you to get store's published products. Filters (q, sku): q: (can be name, description, retail price, sku number) sku: (search with sku number) parent_product_id: (search with parent product id) product_id: (search with product id) + Parameters + store_id: `52` (number, required) - The ID of a store that you want to get its products. + page: 1 (number,required) - The pagination number. (Each page returns 12 items) + q: `MyProduct` (string) - The search keyword + sku: `SK11-123-123,82jjss93` (string) - The SKU numbers of the products you want to search for separated with comma.

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

Query parameters

ParameterRequiredDescription
qoptionalQuery parameter: q
skuoptionalQuery parameter: sku

cURL

curl -X GET 'https://api.roadcube.io/v1/p/stores/{store_id}/products{?q={q}&sku={sku}' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN'

Response 200

ParameterRequiredDescription
parent_product_idoptionalThis is the company's product id (if the product has been created via company panel, and not from the store itself) ex. 9388
Example response
{
  "code": 200,
  "status": "success",
  "message": "STORE_PRODUCTS",
  "data": {
    "products": [
      {
        "product_id": 37865,
        "product_category": {
          "product_category_id": 230,
          "store_id": 234,
          "name": {
            "el": "Προϊόντα",
            "en": "Products",
            "it": "Prodotti"
          },
          "default_product_category": true,
          "created_at": "2021-08-20T06:15:05.000000Z",
          "updated_at": "2021-08-20T06:15:05.000000Z",
          "deleted_at": null,
          "old_product_category_id": 2029,
          "sorting": null
        },
        "parent_product_id": 37851,
        "name": {
          "el": "Νέο Προιόν 13",
          "en": "New Product 13",
          "it": "Nuovo prodotto 12"
        },
        "description": {
          "el": "Νέο Προιόν Περιγραφή 13",
          "en": "New Product Description 13",
          "it": "Nuovo prodotto descrizione 12"
        },
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png",
        "retail_price": "1.0000",
        "reward_points": 1,
        "reward_type": {
          "reward_type_id": 2,
          "title": "Euro"
        },
        "sku_number": "82jjss93",
        "published": true
      },
      {
        "product_id": 9472,
        "product_category": {
          "product_category_id": 381,
          "store_id": 381,
          "name": {
            "el": "Προϊόντα",
            "en": "Products",
            "it": "Prodotti"
          },
          "default_product_category": true,
          "created_at": "2021-08-20T06:15:05.000000Z",
          "updated_at": "2021-08-20T06:15:05.000000Z",
          "deleted_at": null,
          "old_product_category_id": 3198,
          "sorting": null
        },
        "parent_product_id": 9388,
        "name": {
          "el": "test",
          "en": "test",
          "it": "test"
        },
        "description": {
          "el": "test",
          "en": "test",
          "it": "test"
        },
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png",
        "retail_price": "2.0000",
        "reward_points": 5,
        "reward_type": {
          "reward_type_id": 4,
          "title": "Litre"
        },
        "sku_number": "SK11-123-123",
        "published": true
      },
      {
        "product_id": 10125,
        "product_category": {
          "product_category_id": 381,
          "store_id": 381,
          "name": {
            "el": "Προϊόντα",
            "en": "Products",
            "it": "Prodotti"
          },
          "default_product_category": true,
          "created_at": "2021-08-20T06:15:05.000000Z",
          "updated_at": "2021-08-20T06:15:05.000000Z",
          "deleted_at": null,
          "old_product_category_id": 3198,
          "sorting": null
        },
        "parent_product_id": 10041,
        "name": {
          "el": "pame",
          "en": "pame",
          "it": "pame"
        },
        "description": {
          "el": "pame",
          "en": "pame",
          "it": "pame"
        },
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png",
        "retail_price": "2.0000",
        "reward_points": 2,
        "reward_type": {
          "reward_type_id": 3,
          "title": "Item"
        },
        "sku_number": "SK11-123-124",
        "published": true
      }
    ],
    "pagination": {
      "total": 2,
      "total_pages": 1,
      "previous_page": null,
      "current_page": 1,
      "next_page": null,
      "items_per_page": 12,
      "displayed": 2
    }
  },
  "extra": [],
  "error": false
}
POST /stores/{store_id}/products/

Create store's product

This action allows you to create a product for a store. + Parameters + store_id: `1012` (number, required) - The ID of a store that you want to create the product.

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

Request body

ParameterRequiredDescription
enoptionalExample: Νέο Προιόν 10` (string) Greek name
eloptionalExample: New Product 10` (string) English name
itoptionalExample: Nuovo prodotto 10` (string) Italian name
enoptionalExample: Νέο Προιόν Περιγραφή 10` (string) Greek description
eloptionalExample: New Product Description 10` (string) English description
itoptionalExample: Nuovo prodotto descrizione 10` (string) Italian description
publishedbooleanoptionalFlag to set if the product should be published ex. true
retail_pricenumberoptionalThe retail price of the product ex. 10
wholesale_pricenumberoptionalThe wholesale price of the product ex. 8
group_productbooleanoptionalFlag to set if the product is a groupo product ex. false
availability_daysarrayoptionalExample: [0,1,2,3,4,5,6]

Example request

{
  "published": true,
  "name": {
    "el": "Νέο Προιόν 10",
    "en": "New Product 10",
    "it": "Nuovo prodotto 10"
  },
  "description": {
    "el": "Νέο Προιόν Περιγραφή 10",
    "en": "New Product Description 10",
    "it": "Nuovo prodotto descrizione 10"
  },
  "retail_price": "1",
  "wholesale_price": 11,
  "product_category_id": 1146,
  "group_product": false,
  "availability_days": [
    0,
    1,
    2,
    3
  ]
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/stores/{store_id}/products/' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "published": true,
  "name": {
    "el": "Νέο Προιόν 10",
    "en": "New Product 10",
    "it": "Nuovo prodotto 10"
  },
  "description": {
    "el": "Νέο Προιόν Περιγραφή 10",
    "en": "New Product Description 10",
    "it": "Nuovo prodotto descrizione 10"
  },
  "retail_price": "1",
  "wholesale_price": 11,
  "product_category_id": 1146,
  "group_product": false,
  "availability_days": [
    0,
    1,
    2,
    3
  ]
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "STORE_PRODUCT_CREATED",
  "data": {
    "product": {
      "product_id": 37254,
      "product_category": {
        "product_category_id": 1146,
        "store_id": 1012,
        "name": {
          "el": "Προϊόντα",
          "en": "Products",
          "it": "Prodotti"
        },
        "default_product_category": true,
        "created_at": "2021-08-20T06:15:05.000000Z",
        "updated_at": "2021-08-20T06:15:05.000000Z",
        "deleted_at": null,
        "old_product_category_id": 8712,
        "sorting": null
      },
      "parent_product_id": null,
      "name": {
        "el": "Νέο Προιόν 7",
        "en": "New Product 7",
        "it": "Nuovo prodotto 7"
      },
      "description": {
        "el": "Νέο Προιόν Περιγραφή 7",
        "en": "New Product Description 7",
        "it": "Nuovo prodotto descrizione 7"
      },
      "image": null,
      "retail_price": "1",
      "reward_points": 4,
      "reward_type": {
        "reward_type_id": 2,
        "title": "Euro"
      },
      "sku_number": null,
      "published": true
    }
  },
  "extra": [],
  "error": false
}
POST /stores/{store_id}/products/

Create company's product

This action allows you to create a product for a company. + Parameters + store_id: `1011` (number, required) - The ID of a company that you want to create the product.

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

Request body

ParameterRequiredDescription
enoptionalExample: Νέο Προιόν 10` (string) Greek name
eloptionalExample: New Product 10` (string) English name
itoptionalExample: Nuovo prodotto 10` (string) Italian name
enoptionalExample: Νέο Προιόν Περιγραφή 10` (string) Greek description
eloptionalExample: New Product Description 10` (string) English description
itoptionalExample: Nuovo prodotto descrizione 10` (string) Italian description
publishedbooleanoptionalFlag to set if the product should be published ex. true
retail_pricenumberoptionalThe retail price of the product ex. 10
wholesale_pricenumberoptionalThe wholesale price of the product ex. 8
group_productbooleanoptionalFlag to set if the product is a groupo product ex. false
availability_daysarrayoptionalThe days the product should be available. Each number represent the days of the ex. [0,1,2,3,4,5,6]
store_idsarrayoptionalEmpty array [] means all stores, specific store ids [1,2,3] means specific stores, null or not in request means no stores ex. []

Example request

{
  "published": true,
  "name": {
    "el": "Νέο Προιόν 6",
    "en": "New Product 6",
    "it": "Nuovo prodotto 6"
  },
  "description": {
    "el": "Νέο Προιόν Περιγραφή 6",
    "en": "New Product Description 6",
    "it": "Nuovo prodotto descrizione 6"
  },
  "retail_price": "1",
  "wholesale_price": 11,
  "group_product": false,
  "availability_days": [
    0,
    1,
    2,
    3
  ],
  "store_ids": []
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/stores/{store_id}/products/' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "published": true,
  "name": {
    "el": "Νέο Προιόν 6",
    "en": "New Product 6",
    "it": "Nuovo prodotto 6"
  },
  "description": {
    "el": "Νέο Προιόν Περιγραφή 6",
    "en": "New Product Description 6",
    "it": "Nuovo prodotto descrizione 6"
  },
  "retail_price": "1",
  "wholesale_price": 11,
  "group_product": false,
  "availability_days": [
    0,
    1,
    2,
    3
  ],
  "store_ids": []
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "COMPANY_PRODUCT_CREATED",
  "data": {
    "product": {
      "product_id": 37251,
      "product_category": {
        "product_category_id": 1145,
        "store_id": 1011,
        "name": {
          "el": "Προϊόντα",
          "en": "Products",
          "it": "Prodotti"
        },
        "default_product_category": true,
        "created_at": "2021-08-20T06:15:05.000000Z",
        "updated_at": "2021-08-20T06:15:05.000000Z",
        "deleted_at": null,
        "old_product_category_id": 8708,
        "sorting": null
      },
      "parent_product_id": null,
      "name": {
        "el": "Νέο Προιόν 6",
        "en": "New Product 6",
        "it": "Nuovo prodotto 6"
      },
      "description": {
        "el": "Νέο Προιόν Περιγραφή 6",
        "en": "New Product Description 6",
        "it": "Nuovo prodotto descrizione 6"
      },
      "image": null,
      "retail_price": "1",
      "reward_points": null,
      "reward_type": {
        "reward_type_id": 1,
        "title": "Transaction"
      },
      "sku_number": null,
      "published": true
    }
  },
  "extra": [],
  "error": false
}
PUT /stores/{store_id}/products/parent/{parent_product_id}

Update store's product with reference to parent product

This action allows you to update a product for store by its parent product id. + Parameters + store_id: `234` (number, required) - The ID of a store that you want to get its products. + parent_product_id: `16030` (number, required) - The ID of the product that you want to update.

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id
parent_product_idstringrequiredPath parameter: parent_product_id

Request body

ParameterRequiredDescription
enoptionalExample: Το προιόν μου` (string) Greek name
eloptionalExample: My product` (string) English name
itoptionalExample: Il mio prodotto` (string) Italian name
enoptionalExample: Το προιόν μου` (string) Greek description
eloptionalExample: My product` (string) English description
itoptionalExample: Il mio prodotto` (string) Italian description
publishedbooleanoptionalFlag to set if the product should be published ex. true
retail_pricenumberoptionalThe retail price of the product ex. 10
wholesale_pricenumberoptionalThe wholesale price of the product ex. 8
reward_type_idnumberoptional1 = Transaction, 2 = Euro, 3 = Item, 4 = Litre/Kilo ex. 1
availability_daysarrayoptionalExample: [0,1,2,3,4,5,6]

Example request

{
  "name": [
    {
      "el": "Το προιόν μου",
      "en": "My product",
      "it": "Il mio prodotto"
    }
  ],
  "description": [
    {
      "el": "Το προιόν μου",
      "en": "My product",
      "it": "Il mio prodotto"
    }
  ],
  "published": true,
  "retail_price": 100,
  "reward_type_id": 13,
  "sku_number": "w986gf488"
}

cURL

curl -X PUT 'https://api.roadcube.io/v1/p/stores/{store_id}/products/parent/{parent_product_id}' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "name": [
    {
      "el": "Το προιόν μου",
      "en": "My product",
      "it": "Il mio prodotto"
    }
  ],
  "description": [
    {
      "el": "Το προιόν μου",
      "en": "My product",
      "it": "Il mio prodotto"
    }
  ],
  "published": true,
  "retail_price": 100,
  "reward_type_id": 13,
  "sku_number": "w986gf488"
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "PRODUCT_UPDATED",
  "data": {
    "product": {
      "product_id": 16038,
      "product_category": {
        "product_category_id": 230,
        "store_id": 234,
        "name": {
          "el": "Προϊόντα",
          "en": "Products",
          "it": "Prodotti"
        },
        "default_product_category": true,
        "created_at": "2021-08-20T06:15:05.000000Z",
        "updated_at": "2021-08-20T06:15:05.000000Z",
        "deleted_at": null,
        "old_product_category_id": 2029,
        "sorting": null
      },
      "parent_product_id": 16030,
      "name": {
        "el": "Το προιόν μου",
        "en": "My product",
        "it": "Il mio prodotto"
      },
      "description": [
        {
          "el": "Το προιόν μου",
          "en": "My product",
          "it": "Il mio prodotto"
        }
      ],
      "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png",
      "retail_price": 100,
      "reward_points": 13,
      "reward_type": {
        "reward_type_id": 2,
        "title": "Euro"
      },
      "sku_number": "w986gf488",
      "published": true
    }
  },
  "extra": [],
  "error": false
}

Catégories de produits

Product Categories · 2 endpoints

GET /stores/{store_id}/product-categories/{

Get store's product categories

This action allows you to get store's product categories filtered and paginated. + Parameters + store_id: `234` (number, required) - The ID of a store that you want to get its product categories.

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

cURL

curl -X GET 'https://api.roadcube.io/v1/p/stores/{store_id}/product-categories/{' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "MANY_PRODUCT_CATEGORIES_RETRIEVED",
  "data": {
    "product_categories": [
      {
        "product_category_id": 1455,
        "store_id": 234,
        "name": {
          "el": "Τεχνολογία",
          "en": "Technology",
          "it": "Tecnologia"
        },
        "default_product_category": false,
        "created_at": "2023-04-24T08:19:09.000000Z",
        "updated_at": "2023-04-24T08:19:09.000000Z",
        "deleted_at": null,
        "old_product_category_id": null,
        "sorting": null
      },
      {
        "product_category_id": 230,
        "store_id": 234,
        "name": {
          "el": "Προϊόντα",
          "en": "Products",
          "it": "Prodotti"
        },
        "default_product_category": true,
        "created_at": "2021-08-20T06:15:05.000000Z",
        "updated_at": "2021-08-20T06:15:05.000000Z",
        "deleted_at": null,
        "old_product_category_id": 2029,
        "sorting": null
      }
    ],
    "pagination": {
      "total": 2,
      "total_pages": 1,
      "previous_page": null,
      "current_page": 1,
      "next_page": null,
      "items_per_page": 12,
      "displayed": 2
    }
  },
  "extra": [],
  "error": false
}
POST /stores/{store_id}/product-categories/

Create store's product category

This action allows you to create a product category for a store. + Parameters + store_id: `234` (number, required) - The ID of a store that you want to create the product.

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

Request body

ParameterRequiredDescription
enoptionalExample: Νέο Προιόν 10` (string) Greek name
eloptionalExample: New Product 10` (string) English name
itoptionalExample: Nuovo prodotto 10` (string) Italian name

Example request

{
  "name": {
    "el": "Τεχνολογία",
    "en": "Technology",
    "it": "Tecnologia"
  }
}

cURL

curl -X POST 'https://api.roadcube.io/v1/p/stores/{store_id}/product-categories/' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN' \
  -d '{
  "name": {
    "el": "Τεχνολογία",
    "en": "Technology",
    "it": "Tecnologia"
  }
}'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "PRODUCT_CATEGORY_CREATED",
  "data": {
    "product_category": {
      "name": {
        "el": "Τεχνολογία",
        "en": "Technology",
        "it": "Tecnologia"
      },
      "store_id": "234",
      "updated_at": "2023-04-24T08:19:09.000000Z",
      "created_at": "2023-04-24T08:19:09.000000Z",
      "product_category_id": 1455
    }
  },
  "extra": [],
  "error": false
}

Coupons

Coupons · 1 endpoints

GET /coupons{

Get the list

This action allows you to get a list of company's available coupons. + Parameters + page: 1 (number) - Pagination

cURL

curl -X GET 'https://api.roadcube.io/v1/p/coupons{' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "ALL_COUPONS",
  "data": {
    "coupons": [
      {
        "coupon_id": 1113,
        "title": "test expire",
        "description": "test expire",
        "points": 9,
        "cost": "9.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1116,
        "title": "test no image",
        "description": "test no image",
        "points": 1,
        "cost": "1.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1130,
        "title": "test dim p",
        "description": "test dim p",
        "points": 20,
        "cost": "10.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1102,
        "title": "All voucher",
        "description": "All voucher",
        "points": 1,
        "cost": "1.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1103,
        "title": "Green Voucher",
        "description": "Green Voucher",
        "points": 2,
        "cost": "20.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1104,
        "title": "Yellow Voucher",
        "description": "Yellow Voucher",
        "points": 2,
        "cost": "20.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1105,
        "title": "Silver Voucher",
        "description": "Silver Voucher",
        "points": 20000,
        "cost": "30.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1107,
        "title": "Green New",
        "description": "Green New",
        "points": 2,
        "cost": "10.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1108,
        "title": "Yellow New",
        "description": "Yellow New",
        "points": 10000,
        "cost": "10.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      },
      {
        "coupon_id": 1109,
        "title": "Silver Product",
        "description": "Silver Product",
        "points": 2,
        "cost": "30.00",
        "image": "https://roadcube-stage-files.s3.eu-central-1.amazonaws.com/images/info/rc/no-image.png"
      }
    ],
    "pagination": {
      "total": 10,
      "total_pages": 1,
      "previous_page": null,
      "current_page": 1,
      "next_page": null,
      "items_per_page": 12,
      "displayed": 10
    }
  },
  "extra": [],
  "error": false
}

Entreprise

Company · 1 endpoints

GET /stores/{store_id}/point-titles/{

Get point titles

This action allows you to get a list of company's point titles. + Parameters + store_id: `1` (number, required) - The ID of a company that you want to get its point titles. + page: 1 (number) - Pagination

Path parameters

ParameterRequiredDescription
store_idstringrequiredPath parameter: store_id

cURL

curl -X GET 'https://api.roadcube.io/v1/p/stores/{store_id}/point-titles/{' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Api-Token: YOUR_API_TOKEN'

Response 200

Example response
{
  "code": 200,
  "status": "success",
  "message": "COMPANY_POINT_TITLES",
  "data": {
    "titles": [
      {
        "store_point_title_id": 194,
        "company_id": 1,
        "from": 0,
        "to": 10000,
        "title": {
          "el": "Νέο Επίπεδο 1",
          "en": "New Tier 1",
          "it": "Nuovo Livello 1"
        },
        "description": {
          "el": "Περιγραφή Επιπέδου",
          "en": "Tier description",
          "it": "Descrizione del livello"
        },
        "color": "#2922E6FF",
        "created_at": "2024-02-02T09:38:26.000000Z",
        "updated_at": "2024-06-18T09:34:48.000000Z",
        "multiplier": "1.00",
        "expiration_days": -1,
        "valid_days_before": null
      },
      {
        "store_point_title_id": 195,
        "company_id": 1,
        "from": 10001,
        "to": 20000,
        "title": {
          "el": "Νέο Επίπεδο 2",
          "en": "New Tier 2",
          "it": "Nuovo Livello 2"
        },
        "description": {
          "el": "Περιγραφή Επιπέδου",
          "en": "Tier description",
          "it": "Descrizione del livello"
        },
        "color": "#7B01ABFF",
        "created_at": "2024-02-02T09:38:26.000000Z",
        "updated_at": "2024-06-18T09:34:48.000000Z",
        "multiplier": "1.00",
        "expiration_days": -1,
        "valid_days_before": 1
      },
      {
        "store_point_title_id": 196,
        "company_id": 1,
        "from": 20001,
        "to": -1,
        "title": {
          "el": "Νέο Επίπεδο 3",
          "en": "New Tier 3",
          "it": "Nuovo Livello 3"
        },
        "description": {
          "el": "Περιγραφή Επιπέδου",
          "en": "Tier description",
          "it": "Descrizione del livello"
        },
        "color": "#3C07B2FF",
        "created_at": "2024-02-02T09:38:26.000000Z",
        "updated_at": "2024-06-18T09:34:48.000000Z",
        "multiplier": "1.00",
        "expiration_days": -1,
        "valid_days_before": null
      }
    ],
    "pagination": {
      "total": 3,
      "total_pages": 1,
      "previous_page": null,
      "current_page": 1,
      "next_page": null,
      "items_per_page": 12,
      "displayed": 3
    }
  },
  "extra": [],
  "error": false
}

Besoin d’aide ?

Pour l’accès au token ou le support technique, contactez-nous.