NAV
javascript

Introduction

Bienvenido a Anna API! Puedes usar esta API para acceder a los recursos API endpoints.

¡Tenemos enlace de idioma JavaScript! Puede ver ejemplos de código en el área oscura a la derecha.

Autenticación Token

Para autorizar, use este código:

        
          const headers = { Authorization: `${token}` };
          return axios.get(URLConstants.USER_URL, { headers });
        
      

Asegúrese de reemplazar token con su clave API.

Authorization: token

El token de sesion lo optienes en el servicio de registro de celular o email

Registrar Expo Token

        
          
            const headers = { Authorization: `${token}` };
            {
              "pushToken": "ExponentPushToken[OJ503bI779MloM2cGwciYf]"
            }
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": null
            }
          
        
      

Este endpoint permite registrar el Expo token para recibir notificaciones push desde el servidor, en modo develop recibiras una noti push garantizando que estan conectados el app y el server

HTTP Request

POST https://api.anna.com.co/api/v1/account/exponentPushToken

Query Parameters

Parameter Description
pushToken Enviar en string del expo token. Ejemplo: "ExponentPushToken[OJ503bI779MloM2cGwciYf]"

Validar Email

        
          
            {
              "email" : "emaildeprueba@anna.com.co"
            }
          
        
      

The above command returns JSON structured like this:

        
          
            No repetido
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": null
            }
            Repetido
            {
              "status": 401,
              "message_es": "Lo siento el correo ingresado ya esta en uso, intenta con otro",
              "message_en": "Sorry the entered email is already in use, try another",
              "error": true
            }            
          
        
      

Este endpoint permite validar la no existencia del correo ingresado por la annita

HTTP Request

POST https://api.anna.com.co/api/v1/account/emailExist

Query Parameters

Parameter Description

Validar Teléfono

        
          
            {
              "phone" : "+573057845875"
            }
          
        
      

The above command returns JSON structured like this:

        
          
            No repetido
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": null
            }
            Repetido
            {
              "status": 401,
              "message_es": "Lo siento el número ingresado ya esta en uso, intenta con otro",
              "message_en": "Sorry the entered number is already in use, try another",
              "error": true
            }
          
        
      

Este endpoint permite validar la no existencia del número de teléfono ingresado por la annita

HTTP Request

POST https://api.anna.com.co/api/v1/account/phoneExist

Query Parameters

Parameter Description

Registrar Annita

        
          
            {
              "firstName" : "Victor Franco",
              "email" : "emaildeprueba@anna.com.co",
              "phone" : "+573057845875",
              "city" : "Cartagena"
            }
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Continua con el siguiente paso",
              "message_en": "",
              "result": {
                "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1ZjZiOGNjZDc4YmJkNzAzZDFhZDAzMWMiLCJwcm9maWxlIjoiUEFSVE5FUiIsImNyZWF0ZSI6MTYwMDg4MzkxNywiZXhwaXJlIjoxNjAxNDg4NzE3LCJpYXQiOjE2MDA4ODM5MTd9.aHHEigf-haWPpzSUGvgw27naACfyrqw13aFVhZzznJs"
              }
            }
          
        
      

Este endpoint permite realizar el registro inicial de las annitas y retorna el token de acceso en caso positivo

HTTP Request

POST https://api.anna.com.co/api/v1/account/register

Query Parameters

Parameter Description

Validar Documentos Truora

        
          
            const headers = { Authorization: `${token}` };
            {
              "typeDocument" : "CC", //PEP o PASAPORTE
              "imageFront" : "Imagen en formato Base64" 
              "imageBack" : "Imagen en formato Base64" //Solo para typeDocument = CC
            }
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": {
                "_id": "5f6b8ccd78bbd703d1ad031c",
                "profile": "PARTNER",
                "firstName": "Victor Franco",
                "email": "emaildeprueba@anna.com.co",
                "confirmEmail": false,
                "phone": "+573057845875",
                "code": "1133",
                "confirmPhone": false,
                "active": false,
                "step": 2,
                "fullRecord": false,
                "city": "Cartagena",
                "createdAt": "2020-09-23T17:58:37.829Z",
                "updatedAt": "2020-09-23T18:17:00.755Z",
                "lastLogin": "2020-09-23T17:58:37.829Z",
                "activeTruora": true,
                "birthdate": "1994-04-20",
                "check_id": "CHK18146e17f9074634ad54b24331ebdbdc",
                "dni": "1126254078",
                "dniBack": "/documents/78ab7424-e495-4751-a24e-cfe8c5072edf.jpg",
                "dniFront": "/documents/adc4f510-b882-42f9-a620-e2c9afc0b4d6.jpg",
                "dniType": "CC",
                "expeditionDate": "2014-08-14",
                "expeditionPlace": "CON MARACAIBO VEN",
                "gender": "M",
                "lastName": "Reverol Angel",
                "placeBirth": "MARACAIBO-ESTADO ZULIA",
                "scoreTruora": 1,
                "statusTruora": "completed"
              }
            }
          
        
      

Este endpoint permite validar los documentos enviados por la annita con truora, en caso de recibir respuesta de truora al momento de la validación el statusTruora sera completed, el scoreTruora estará entre 0 y 1, a partir de 0.7 activeTruora será true y el valor de step será 2 lo que significa que la persona está validada por truora y puede continuar el registro, en caso contrario activeTruora será false significa que la persona no es aprobada por Truora y se mantendrá en step 1. En caso de recibir incompleted en statusTruora significa que no se ha racibido una respuesta de Truora, para esos casos se cuenta con un cron que revisara cada minuto la respuesta de truora y se enviará una notificacion push en caso de ser aprobado o rechazado por truora.

HTTP Request

POST https://api.anna.com.co/api/v1/account/validateTruora

Query Parameters

Parameter Description

Validar Teléfono

        
          
            {
              "tokenRecovery" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1ZWY1MzE2NWQ5N2VlYzZiMzQ1N2NmMzMiLCJjb2RlIjoiMDMxMSIsImNyZWF0ZSI6MTYwMTY1OTI5MSwiZXhwaXJlIjoxNjAxNjYyODkxLCJpYXQiOjE2MDE2NTkyOTF9.i8HYvV4AhxpwJlkbR5TrZ6BIwzfPJZFXTQAT1UFfcO4",
              "code" : "0311"
            }
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Bienvenido a Anna",
              "message_en": "Wellcome to Anna",
              "result": {
                "_id": "5ef53165d97eec6b3457cf33",
                "codeId": "0002",
                "firstName": "Julia",
                "lastName": "Garrido",
                "email": "partner2@anna.com.co",
                "profile": "PARTNER",
                "dni": "1024479619",
                "dniType": "CC",
                "statusTruora": "completed",
                "scoreTruora": 1,
                "checkId": "CHK82fba9cebbae1294dbe5027145233431",
                "birthdate": "1992/11/02",
                "active": true,
                "fullRecord": true,
                "urlDniFront": "/images/dni/ad636f82-fc18-4502-b40b-408f54c5afdc.jpg",
                "urlDniBack": "/images/dni/939db5bf-ef85-4346-bdbc-37d6c60d9dd7.jpg",
                "placeBirth": "BOGOTA D.C",
                "height": "1.76",
                "bloodType": "O+",
                "expeditionDate": "2006-03-28",
                "expeditionPlace": "BOGOTA",
                "createdAt": "2020-06-25T23:05:46.239Z",
                "updatedAt": "2020-10-02T17:14:40.305Z",
                "activeTruora": true,
                "gender": "Female",
                "step": 2,
                "phone": "+573024473767",
                "code": "",
                "confirmPhone": true,
                "urlProfileImage": "/images/avatar-hombre.png",
                "bio": "Muy activa con ganas de trabajar.",
                "pushToken": "ExponentPushToken[T6iyihEWmeOasY987NYEBw]",
              }
            }
          
        
      

Este endpoint permite validar el código que fue enviado al telefono de la annita.

HTTP Request

POST https://api.anna.com.co/api/v1/account/validatePhonePartner

Query Parameters

Parameter Description

Agregar Servicios

        
          
            const headers = { Authorization: `${token}` };
            {
              "services" : ["5ec9459032ac9d1941acc019","5f722a728811a7822d41af08"]
            }
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": {
                "_id": "5f6b8ccd78bbd703d1ad031c",
                "profile": "PARTNER",
                "firstName": "Daniel Antonio",
                "email": "emaildeprueba@anna.com.co",
                "confirmEmail": false,
                "phone": "+573057845875",
                "code": "1133",
                "confirmPhone": false,
                "active": false,
                "step": 4,
                "fullRecord": false,
                "city": "Cartagena",
                "createdAt": "2020-09-23T17:58:37.829Z",
                "updatedAt": "2020-09-29T18:10:21.916Z",
                "lastLogin": "2020-09-23T17:58:37.829Z",
                "activeTruora": true,
                "birthdate": "1994-04-20",
                "check_id": "CHK18146e17f9074634ad54b24331ebdbdc",
                "dni": "1126254078",
                "dniBack": "/documents/78ab7424-e495-4751-a24e-cfe8c5072edf.jpg",
                "dniFront": "/documents/adc4f510-b882-42f9-a620-e2c9afc0b4d6.jpg",
                "dniType": "CC",
                "expeditionDate": "2014-08-14",
                "expeditionPlace": "CON MARACAIBO VEN",
                "gender": "Male",
                "lastName": "Reverol Angel",
                "placeBirth": "MARACAIBO-ESTADO ZULIA",
                "scoreTruora": 1,
                "statusTruora": "completed",
                "pushToken": "ExponentPushToken[W7OBCuOoi3frrAJCah4k_R]",
                "services": [
                  "5ec9459032ac9d1941acc019",
                  "5f722a728811a7822d41af08"
                ]
              }
            }
          
        
      

Este endpoint permite que las annitas agreguen en el paso 4 del registro los servicios en los que quiere trabajar

HTTP Request

POST https://api.anna.com.co/api/v1/account/addServices

Query Parameters

Parameter Description

Certificacion Imagen

        
          
            {
              "certificationImage" : "Imagen Base64"
            }
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": "/certification/49c2e425-bfa7-4b67-98f5-ebaae694fdeb.jpg"
            }
          
        
      

Este endpoint permite cargar al servidor las imagenes en base64 de la certificacion bancaria para el paso 5 de registro y retorna la ruta donde se cargo el archivo

HTTP Request

POST https://api.anna.com.co/api/v1/account/certificationImage

Query Parameters

Parameter Description

Certificacion Imagen

        
          
            {
              "archivo" : "Cerfiticacion.pdf"
            }
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": "/certification/fab05333-7449-4b0c-ae84-d96b1ee9379c.pdf"
            }
          
        
      

Este endpoint permite cargar al servidor las archivos pdf de la certificacion bancaria para el paso 5 de registro mediante form-data y retorna la ruta donde se cargo el archivo

HTTP Request

POST https://api.anna.com.co/api/v1/account/certificationPdf

Query Parameters

Parameter Description

Datos Bancarios

        
          
            const headers = { Authorization: `${token}` };
            {
              "addres" : "direccion de prueba",
              "bankName":"Bancolombia",
              "numAccount":"17500011831", //Número de Teléfono para Nequi y Daviplata
              "typeAccount":"ahorro", //No necesario para Nequi y Daviplata
              "urlCertification":"/certification/fab05333-7449-4b0c-ae84-d96b1ee9379c.pdf"  //No necesario para Nequi y Daviplata
            }          
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": {
                "_id": "5f6b8ccd78bbd703d1ad031c",
                "profile": "PARTNER",
                "firstName": "Daniel Antonio",
                "email": "emaildeprueba@anna.com.co",
                "confirmEmail": false,
                "phone": "+573057845875",
                "code": "1133",
                "confirmPhone": false,
                "active": false,
                "step": 5,
                "fullRecord": false,
                "city": "Cartagena",
                "createdAt": "2020-09-23T17:58:37.829Z",
                "updatedAt": "2020-09-30T22:08:32.351Z",
                "lastLogin": "2020-09-23T17:58:37.829Z",
                "activeTruora": true,
                "birthdate": "1994-04-20",
                "check_id": "CHK18146e17f9074634ad54b24331ebdbdc",
                "dni": "1126254078",
                "dniBack": "/documents/78ab7424-e495-4751-a24e-cfe8c5072edf.jpg",
                "dniFront": "/documents/adc4f510-b882-42f9-a620-e2c9afc0b4d6.jpg",
                "dniType": "CC",
                "expeditionDate": "2014-08-14",
                "expeditionPlace": "CON MARACAIBO VEN",
                "gender": "Male",
                "lastName": "Reverol Angel",
                "placeBirth": "MARACAIBO-ESTADO ZULIA",
                "scoreTruora": 1,
                "statusTruora": "completed",
                "pushToken": "ExponentPushToken[W7OBCuOoi3frrAJCah4k_R]",
                "services": [
                  "5ec9459032ac9d1941acc019",
                  "5f722a728811a7822d41af08"
                ],
                "address": "direccion de prueba",
                "bankName": "BANCOLOMBIA",
                "numAccount": "17500011831",
                "typeAccount": "AHORRO",
                "urlCertification": "/certification/fab05333-7449-4b0c-ae84-d96b1ee9379c.pdf"
              }
            }
          
        
      

Este endpoint permite registrar la data bancaria de la annita para el paso 5 del registro

HTTP Request

POST https://api.anna.com.co/api/v1/account/addBank

Query Parameters

Parameter Description

Dias laborales

        
          
            const headers = { Authorization: `${token}` };
            {
              "workingDays":
              {
                    "lunes" : ["08:00","18:00"],
                    "martes" : ["08:00","18:00"],
                    "miercoles" : ["08:00","18:00"],
                    "jueves" : ["08:00","18:00"],
                    "viernes" : ["08:00","18:00"],
                    "sabado" : ["08:00","20:00"],
                    "domingo" : ["08:00","18:00"]
              },
              "holidays" : true
            }          
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": {
                "_id": "5f6b8ccd78bbd703d1ad031c",
                "profile": "PARTNER",
                "firstName": "Daniel Antonio",
                "email": "emaildeprueba@anna.com.co",
                "confirmEmail": false,
                "phone": "+573057845875",
                "code": "1133",
                "confirmPhone": false,
                "active": false,
                "step": 6,
                "fullRecord": false,
                "city": "Cartagena",
                "createdAt": "2020-09-23T17:58:37.829Z",
                "updatedAt": "2020-10-07T17:50:00.393Z",
                "lastLogin": "2020-09-23T17:58:37.829Z",
                "activeTruora": true,
                "birthdate": "1994-04-20",
                "check_id": "CHK18146e17f9074634ad54b24331ebdbdc",
                "dni": "1126254078",
                "dniBack": "/documents/78ab7424-e495-4751-a24e-cfe8c5072edf.jpg",
                "dniFront": "/documents/adc4f510-b882-42f9-a620-e2c9afc0b4d6.jpg",
                "dniType": "CC",
                "expeditionDate": "2014-08-14",
                "expeditionPlace": "CON MARACAIBO VEN",
                "gender": "Male",
                "lastName": "Reverol Angel",
                "placeBirth": "MARACAIBO-ESTADO ZULIA",
                "scoreTruora": 1,
                "statusTruora": "completed",
                "pushToken": "ExponentPushToken[W7OBCuOoi3frrAJCah4k_R]",
                "services": [
                  "5ec9459032ac9d1941acc019",
                  "5f722a728811a7822d41af08"
                ],
                "address": "direccion de prueba",
                "bankName": "BANCOLOMBIA",
                "numAccount": "17500011831",
                "typeAccount": "AHORRO",
                "urlCertification": "/certifications/imagen.jpeg",
                "holidays": true,
                "workingDays": {
                  "lunes": [
                    "08:00",
                    "18:00"
                  ],
                  "martes": [
                    "08:00",
                    "18:00"
                  ],
                  "miercoles": [
                    "08:00",
                    "18:00"
                  ],
                  "jueves": [
                    "08:00",
                    "18:00"
                  ],
                  "viernes": [
                    "08:00",
                    "18:00"
                  ],
                  "sabado": [
                    "08:00",
                    "20:00"
                  ],
                  "domingo": [
                    "08:00",
                    "18:00"
                  ]
                }
              }
            }
          
        
      

Este endpoint permite registrar los dias laborales para las annitas

HTTP Request

POST https://api.anna.com.co/api/v1/account/addWorkingDays

Query Parameters

Parameter Description

Capacitaciones

        
          
            const headers = { Authorization: `${token}` };
            {
            }          
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": {
                "_id": "5f6b8ccd78bbd703d1ad031c",
                "profile": "PARTNER",
                "firstName": "Daniel Antonio",
                "email": "emaildeprueba@anna.com.co",
                "confirmEmail": false,
                "phone": "+573057845875",
                "code": "1133",
                "confirmPhone": false,
                "active": false,
                "step": 5,
                "fullRecord": false,
                "city": "Cartagena",
                "createdAt": "2020-09-23T17:58:37.829Z",
                "updatedAt": "2020-10-07T17:50:00.393Z",
                "lastLogin": "2020-09-23T17:58:37.829Z",
                "activeTruora": true,
                "birthdate": "1994-04-20",
                "check_id": "CHK18146e17f9074634ad54b24331ebdbdc",
                "dni": "1126254078",
                "dniBack": "/documents/78ab7424-e495-4751-a24e-cfe8c5072edf.jpg",
                "dniFront": "/documents/adc4f510-b882-42f9-a620-e2c9afc0b4d6.jpg",
                "dniType": "CC",
                "expeditionDate": "2014-08-14",
                "expeditionPlace": "CON MARACAIBO VEN",
                "gender": "Male",
                "lastName": "Reverol Angel",
                "placeBirth": "MARACAIBO-ESTADO ZULIA",
                "scoreTruora": 1,
                "statusTruora": "completed",
                "pushToken": "ExponentPushToken[W7OBCuOoi3frrAJCah4k_R]",
                "services": [
                  "5ec9459032ac9d1941acc019",
                  "5f722a728811a7822d41af08"
                ],
                "address": "direccion de prueba",
                "bankName": "BANCOLOMBIA",
                "numAccount": "17500011831",
                "typeAccount": "AHORRO",
                "urlCertification": "/certifications/imagen.jpeg",
                "training": [
                  {
                    "_id": "5ee50f739555277a7f7be3af",
                    "nameTraining": "Primera Leccion",
                    "numTraining": "0002",
                    "necessary": true,
                    "serviceList": [
                      "5ec9459032ac9d1941acc019",
                      "5f722a728811a7822d41af08"
                    ],
                    "status": true,
                    "createdAt": "2020-06-13T17:40:03.261Z",
                    "updatedAt": "2020-06-18T22:15:29.594Z"
                  }
                ]
              }
            }
          
        
      

Este endpoint permite obtener las capacitaciones que debe realizar la annita

HTTP Request

POST https://api.anna.com.co/api/v1/account/findTrainingByPartner

Query Parameters

Parameter Description

Lista de Lecciones

        
          
            const headers = { Authorization: `${token}` };
            {
              "idTraining" : "5ee50f739555277a7f7be3af"
            }          
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": [
                {
                  "_id": "5f1b0df845193263e723b0b6",
                  "nameLessons": "Leccion 2",
                  "numLessons": "0003",
                  "descriptionLessons": "Descripcion Segunda Leccion",
                  "idTraining": "5ee50f739555277a7f7be3af",
                  "status": true,
                  "approved":false,
                  "questions": [
                    {
                      "question": "Esta es la pregunta Uno",
                      "options": [
                        {
                          "text": "Respuesta 1 de Uno"
                        },
                        {
                          "text": "Respuesta 2 de Uno"
                        },
                        {
                          "text": "Respuesta 3 de Uno"
                        },
                        {
                          "text": "Respuesta 4 de Uno"
                        }
                      ],
                      "numQuestion": 1
                    },
                    {
                      "question": "Esta es la pregunta Dos",
                      "options": [
                        {
                          "text": "Respuesta 1 de Uno"
                        },
                        {
                          "text": "Respuesta 2 de Uno"
                        },
                        {
                          "text": "Respuesta 3 de Uno"
                        },
                        {
                          "text": "Respuesta 4 de Uno"
                        }
                      ],
                      "numQuestion": 2
                    }
                  ],
                  "createdAt": "2020-07-24T16:36:08.488Z",
                  "updatedAt": "2020-07-24T16:36:08.488Z"
                }
              ]
            }
          
        
      

Este endpoint permite obtener data de las lecciones de la capacitacion

HTTP Request

POST https://api.anna.com.co/api/v1/lessons/listPartner

Query Parameters

Parameter Description

Logout (exit sesión)

        
          
            const headers = { Authorization: `${token}` };
            
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": null
            }
          
        
      

Este endpoint permite cerrar sesión y borrar el ExpoToken asignado a la app

HTTP Request

GET https://api.anna.com.co/api/v1/account/logout

Query Parameters

Parameter Description

Aceptar Orden

        
          
            const headers = { Authorization: `${token}` };
            {
              "orders":
              [
                {
                  "id":"5f38431b0e4833664b5e78c2"
                }
              ]
            }
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Felicidades, has aceptado el servicio",
              "message_en": "Congratulations, you've accepted the service",
              "result": {
                "idRequisition": "5f38431b0e4833664b5e78bf",
                "Service": [
                  {
                    "id": "5ec9459032ac9d1941acc019",
                    "name": "Aseo General",
                    "icon": "/images/s-aseo.png"
                  }
                ],
                "Orders": [
                  {
                    "id": "5f38431b0e4833664b5e78c2"
                  }
                ],
                "hour": "04:27 pm"
              }
            }
          
        
      

Este endpoint permite a las annitas aceptar ordenes de servicio

HTTP Request

POST https://api.anna.com.co/api/v1/order/acceptOrder

Query Parameters

Parameter Description

Finalizar Orden

        
          
            const headers = { Authorization: `${token}` };
            {
              "orders":
              [
                {
                  "id":"5f38431b0e4833664b5e78c2"
                }
              ]
            }
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Felicidades, has finalizado con éxito tu servicio",
              "message_en": "Congratulations, you have successfully completed your service",
              "result": {
                "idRequisition": "5f38431b0e4833664b5e78bf",
                "partner": {
                  "id": "5ef53165d97eec6b3457cf33",
                  "firstName": "Maria Antonia",
                  "lastName": "Hernandez Gil",
                  "urlProfileImage": "/images/avatar-hombre.png"
                },
                "orders": [
                  {
                    "id": "5f38431b0e4833664b5e78c2"
                  }
                ]
              }
            }
          
        
      

Este endpoint permite a las annitas finalizar ordenes de servicio

HTTP Request

POST https://api.anna.com.co/api/v1/order/finishOrderAnnita

Query Parameters

Parameter Description

Rechazar Orden

        
          
            const headers = { Authorization: `${token}` };
            {
              "orders":
              [
                {
                  "id":"5f38431b0e4833664b5e78c2"
                }
              ]
            }
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Has rechazado la solicitud de servicio",
              "message_en": "You rejected the request for service",
              "result": null
            }
          
        
      

Este endpoint permite a las annitas rechazar solicitudes de ordenes de servicio

HTTP Request

POST https://api.anna.com.co/api/v1/order/rejectOrder

Query Parameters

Parameter Description

Rechazos Permitidos

        
          
            {
              "idCountry":"CO"
            }
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": {
                "value": 3,
                "penalty": 6,
                "type": "hour"
              }
            }
          
        
      

Este endpoint permite obtener la cantidad de rechazos seguidos permitidos asi como la penalidad a aplicar

HTTP Request

POST https://api.anna.com.co/api/v1/commission/getPenalties

Query Parameters

Parameter Description

Iniciar Servicio

        
          
            const headers = { Authorization: `${token}` };
            {
              "orders":
              [
                {
                  "id":"5f2acabd6226310a75df1ea0"
                }
              ]
            }
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": null
            }
          
        
      

Este endpoint permite a la annita iniciar el servicio seleccionado

HTTP Request

POST https://api.anna.com.co/api/v1/order/startOrderAnnita

Query Parameters

Parameter Description

Servicios Pendientes Annita

        
          
            const headers = { Authorization: `${token}` };
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": [
                {
                  "idRequisition": "5f2acabd6226310a75df1e9f",
                  "hour": "06:56 pm",
                  "status": "INITIATED",
                  "Location": {
                    "id": "5f247fad9c0aba302c6c5fa5",
                    "address": "Cra 109a # 151-09",
                    "lat": 4.7513631,
                    "lng": -74.0972867,
                    "suggestion": "Apto"
                  },
                  "User": {
                    "id": "5f247d2c9c0aba302c6c5fa4",
                    "firstName": "Daniel",
                    "lastName": "Reverol",
                    "urlProfileImage": "https://api.anna.com.co/images/avatar/180f789a-2fc5-4689-9035-48505c5b4374.jpg"
                  },
                  "Services": [
                    {
                      "id": "5ec9459032ac9d1941acc019",
                      "name": "Aseo General",
                      "icon": "/images/s-aseo.png"
                    },
                    {
                      "id": "5eff110bef8b1474d9b84db0",
                      "name": "Cocinar",
                      "icon": "/images/s-cocinar.png"
                    }
                  ],
                  "Orders": [
                    {
                      "id": "5f2acabd6226310a75df1ea0"
                    },
                    {
                      "id": "5f2acabd6226310a75df1ea1"
                    }
                  ]
                },
                {
                  "idRequisition": "5f2ad1b16226310a75df1ea2",
                  "status": "ACCEPTED",
                  "Location": {
                    "id": "5f247fad9c0aba302c6c5fa5",
                    "address": "Cra 109a # 151-09",
                    "lat": 4.7513631,
                    "lng": -74.0972867,
                    "suggestion": "Apto"
                  },
                  "User": {
                    "id": "5f247d2c9c0aba302c6c5fa4",
                    "firstName": "Daniel",
                    "lastName": "Reverol",
                    "urlProfileImage": "https://api.anna.com.co/images/avatar/180f789a-2fc5-4689-9035-48505c5b4374.jpg"
                  },
                  "Services": [
                    {
                      "id": "5ec9459032ac9d1941acc019",
                      "name": "Aseo General",
                      "icon": "/images/s-aseo.png"
                    },
                    {
                      "id": "5eff0e44ef8b1474d9b84dae",
                      "name": "Cocina Pro",
                      "icon": "/images/s-cocinapro.png"
                    }
                  ],
                  "Orders": [
                    {
                      "id": "5f2ad1b16226310a75df1ea3"
                    },
                    {
                      "id": "5f2ad1b16226310a75df1ea4"
                    }
                  ]
                },
                {
                  "idRequisition": "5f3446db7d7f5f0fe70fef67",
                  "hour": "04:16 pm",
                  "status": "ACCEPTED",
                  "Location": {
                    "id": "5f273beeb788301e2678bf42",
                    "address": "Cra 109a # 151-09",
                    "lat": 4.7513631,
                    "lng": -74.0972867,
                    "suggestion": "Apto 3204"
                  },
                  "User": {
                    "id": "5f26fd75d5017918964d5296",
                    "firstName": "Daniel",
                    "lastName": "Reverol",
                    "urlProfileImage": "https://api.anna.com.co/images/avatar/c4f46b95-81ac-48db-8075-9cc82aeb52ce.jpg"
                  },
                  "Services": [
                    {
                      "id": "5ec9459032ac9d1941acc019",
                      "name": "Aseo General",
                      "icon": "/images/s-aseo.png"
                    },
                    {
                      "id": "5eff121def8b1474d9b84db2",
                      "name": "Limpieza de baños",
                      "icon": "/images/s-banos.png"
                    }
                  ],
                  "Orders": [
                    {
                      "id": "5f3446db7d7f5f0fe70fef68"
                    },
                    {
                      "id": "5f3446db7d7f5f0fe70fef69"
                    }
                  ]
                },
                {
                  "idRequisition": "5f356d8e256b55796ccafa64",
                  "hour": "06:56 pm",
                  "status": "ACCEPTED",
                  "Location": {
                    "id": "5f273beeb788301e2678bf42",
                    "address": "Cra 109a # 151-09",
                    "lat": 4.7513631,
                    "lng": -74.0972867,
                    "suggestion": "Apto 3204"
                  },
                  "User": {
                    "id": "5f26fd75d5017918964d5296",
                    "firstName": "Daniel",
                    "lastName": "Reverol",
                    "urlProfileImage": "https://api.anna.com.co/images/avatar/c4f46b95-81ac-48db-8075-9cc82aeb52ce.jpg"
                  },
                  "Services": [
                    {
                      "id": "5ec9459032ac9d1941acc019",
                      "name": "Aseo General",
                      "icon": "/images/s-aseo.png"
                    }
                  ],
                  "Orders": [
                    {
                      "id": "5f356d8e256b55796ccafa65"
                    }
                  ]
                }
              ]
            }
          
        
      

Este endpoint permite a la annita ver los servicios que haya aceptado

HTTP Request

POST https://api.anna.com.co/api/v1/order/findByAnnita

Query Parameters

Parameter Description

Listar Soporte

        
          
            {
              "profile" : "USER" //PARTNER
            }            
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": [
                {
                  "_id": "5f6cf2b5b9d1703a15ca7dbc",
                  "title": "Tienes Problemas Con Tu Annita",
                  "profile": "USER",
                  "content": [
                    {
                      "type": "VIDEO",
                      "value": "https://youtu.be/KzSlyGHjTX8"
                    },
                    {
                      "type": "TEXT",
                      "value": "Este es un texto de prueba para el soporte"
                    }
                  ],
                  "status": true,
                  "count": 2,
                  "createdAt": "2020-09-24T19:25:41.589Z",
                  "updatedAt": "2020-09-24T19:28:03.002Z"
                }
              ]
            }
          
        
      

Este endpoint sirve para listar los elementos de soporte segun el tipo de perfil especificado

HTTP Request

POST https://api.anna.com.co/api/v1/support/list

Query Parameters

Parameters Description

Enviar Mensaje de Soporte

        
          
            const headers = { Authorization: `${token}` };
            {
              "id": "5f6cf2b5b9d1703a15ca7dbc",
              "subject" : "La annita no vino",
              "message" : "Me quede esperando que viniera la annita pero no apareció"
            }          
          
        
      

The above command returns JSON structured like this:

        
          
            {
              "status": 200,
              "message_es": "Operación realizada con éxito",
              "message_en": "Operation performed successfully",
              "result": null
            }
          
        
      

Este endpoint sirve para que los usuarios de las apps puedan enviar mensajes relacionados a un tema de soporte al personal de soporte de anna

HTTP Request

POST https://api.anna.com.co/api/v1/support/sendSupport

Query Parameters

Parameters Description

Response Code

Code Meaning
400 Bad Request -- Su solicitud no es válida.
401 Error -- Retorna un json con el response.error = true y el response.message_es, response.message_en.
403 Unauthorized -- Tu token de API es incorrecta o expiró.
404 Not Found -- No se pudo encontrar el servicio especificado.
500 Internal Server Error -- Tuvimos un problema con nuestro servidor. Intenta nuevamente más tarde.
503 Service Unavailable -- Estamos temporalmente fuera de línea por mantenimiento. Por favor, inténtelo de nuevo más tarde.