# Get multiple inquiries (TBA)

`GET /fuse/v2/inquiries`

Endpoints:

- `https://api.test.neobits.ai/fuse/v2/inquiries`
- `https://api.prod.neobits.ai/fuse/v2/inquiries`

Authentication: one of the following alternatives:

- `basic`

- `basic`: Basic authentication, base64 encoded username:password.

❗

#### Authorization Required

This endpoint requires authentication via the Core API Auth server.

[Learn about authentication →](https://docs.neobits.ai/api-reference/tag/core-authz.md)

  

Get multiple inquiries at a time. Supports cursor-based pagination.

## Parameters

| Name | In | Required | Schema | Description |
| --- | --- | --- | --- | --- |
| `filter[isCompleted]` | query | no | boolean; example `false` | Filter the inquiries by completion status. |
| `page[after]` | query | no | string; example `df786f04a209` | Fetch inquiries after this cursor |
| `page[before]` | query | no | string; example `5061496e` | Fetch inquiries before this cursor |
| `page[size]` | query | no | integer; minimum 1; maximum 200; example `10` | The maximum number of inquiries to return |
| `order` | query | no | string; one of `asc`, `desc`; example `asc` | The order of the inquiries. Defaults to asc. |
| `sort` | query | no | string; one of `createdAt`, `updatedAt`; example `createdAt` | The field to sort the inquiries by. Defaults to createdAt. |

Parameter definitions (including all schema constraints and serialization options):

```json
[
  {
    "in": "query",
    "required": false,
    "name": "filter[isCompleted]",
    "example": "false",
    "schema": {
      "type": "boolean"
    },
    "description": "Filter the inquiries by completion status."
  },
  {
    "in": "query",
    "required": false,
    "name": "page[after]",
    "example": "df786f04a209",
    "schema": {
      "type": "string"
    },
    "description": "Fetch inquiries after this cursor"
  },
  {
    "in": "query",
    "required": false,
    "name": "page[before]",
    "example": "5061496e",
    "schema": {
      "type": "string"
    },
    "description": "Fetch inquiries before this cursor"
  },
  {
    "in": "query",
    "required": false,
    "name": "page[size]",
    "example": 10,
    "schema": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    },
    "description": "The maximum number of inquiries to return"
  },
  {
    "in": "query",
    "required": false,
    "name": "order",
    "example": "asc",
    "schema": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "description": "The order of the inquiries. Defaults to asc."
  },
  {
    "in": "query",
    "required": false,
    "name": "sort",
    "example": "createdAt",
    "schema": {
      "type": "string",
      "enum": [
        "createdAt",
        "updatedAt"
      ]
    },
    "description": "The field to sort the inquiries by. Defaults to createdAt."
  }
]
```

## Responses

### 200 OK

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "type": "object",
  "title": "InquiriesResponse",
  "properties": {
    "metadata": {
      "type": "object",
      "properties": {
        "page": {
          "type": "object",
          "properties": {
            "size": {
              "example": 50,
              "type": "integer",
              "description": "The maximum number of items to return."
            },
            "total": {
              "example": 20,
              "type": "integer",
              "description": "The number of items in the results set."
            },
            "after": {
              "example": "df786f04",
              "type": "string",
              "description": "The cursor to fetch the next page of inquiries."
            },
            "before": {
              "example": "0679c533",
              "type": "string",
              "description": "The cursor to fetch the previous page of inquiries."
            }
          }
        }
      }
    },
    "data": {
      "type": "array",
      "title": "Inquiries",
      "items": {
        "type": "object",
        "title": "Inquiry",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "example": "0679c533-5061-496e-8dc5-df786f04a209"
          },
          "ssn": {
            "type": "string",
            "example": "01029413157",
            "description": "The unique identifier for the person the inquiry is for."
          },
          "url": {
            "example": "https://informasjonsinnhenting.prod.neobits.ai?applicationState=ey12345",
            "format": "uri",
            "type": "string",
            "description": "Give this URL to the user so they can start the flow."
          },
          "externalId": {
            "type": "string",
            "example": "CAN_BE_ANY_STRING",
            "description": "Optional identifier the consumer of the API can provide."
          },
          "skipConsentMessages": {
            "type": "boolean",
            "example": true,
            "description": "Will skip messages explaining to the user which consents are needed to complete the flow."
          },
          "isCompleted": {
            "type": "boolean",
            "example": false,
            "description": "Indicates if the inquiry is completed or not by the user."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2019-09-07T15:50:00Z",
            "description": "Inquiry created date"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2019-09-07T15:50:00Z",
            "description": "Inquiry last updated date"
          },
          "notifications": {
            "type": "array",
            "description": "The notification options set for the inquiry.",
            "items": {
              "type": "object",
              "title": "NotificationOptions",
              "required": [
                "type",
                "message",
                "to"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "SMS"
                  ],
                  "example": "SMS"
                },
                "message": {
                  "type": "string",
                  "example": "Hei. For å dele din informasjon med Bank Bankersen ASA, vennligst gå til denne lenken $link",
                  "description": "The consumer of the API can decide where to place the link to initate the process by passing in $link (see example)"
                },
                "to": {
                  "type": "string",
                  "example": "12345678",
                  "description": "The phone number you want the text message to be sent to"
                }
              }
            }
          },
          "redirect": {
            "type": "object",
            "title": "RedirectOptions",
            "description": "URL's provided here will decide where the user should be sent on flow completion",
            "properties": {
              "onSuccess": {
                "type": "string",
                "description": "URL to send the user to after the data is fetched",
                "format": "url",
                "example": "https://your.frontend.com/success"
              },
              "onError": {
                "type": "string",
                "description": "URL to send the user to when an error occurs. See the \"Error handling\" section above for more info.",
                "format": "url",
                "example": "https://your.frontend.com/error"
              }
            }
          },
          "metadata": {
            "type": "object",
            "properties": {
              "sbl": {
                "type": "object",
                "properties": {
                  "authCode": {
                    "type": "string",
                    "example": "0679c533-5061-496e-8dc5-df786f04a209",
                    "description": "Auhtorization code received from Altinn. Used to retrieve the customers data from Skatteetaten."
                  }
                }
              }
            }
          },
          "prerequisites": {
            "type": "array",
            "description": "Prerequisites are actions that the user must complete before the data can be fetched. They can either be consents that must be given, or flows that must be completed.",
            "items": {
              "type": "object",
              "title": "Prerequisite",
              "description": "Prerequisites are actions that the user must complete before the data can be fetched. They can either be consents that must be given, or flows that must be completed.",
              "properties": {
                "name": {
                  "type": "string",
                  "enum": [
                    "SBL"
                  ],
                  "example": "SBL"
                },
                "isCompleted": {
                  "type": "boolean",
                  "description": "Whether the prerequisite has been completed or not. When the prerequisite requires the user to give prior consent, this field will be true if the user has given consent."
                },
                "consentUrl": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The URL neobits will redirect the user to internally, so the user can complete the prerequisite.",
                  "format": "uri"
                }
              }
            }
          }
        }
      }
    }
  }
}
```

### 400 Bad Request

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "BadRequestResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "BadRequest"
            ],
            "example": "BadRequest"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "400-000",
              "400-001",
              "400-002",
              "400-003",
              "400-004",
              "400-005",
              "400-006",
              "400-007",
              "400-008",
              "400-100",
              "400-101",
              "400-102",
              "400-103",
              "400-104",
              "400-105",
              "400-106",
              "400-107",
              "400-108",
              "400-109",
              "400-110",
              "400-111",
              "400-112"
            ],
            "example": "400-001"
          },
          "message": {
            "type": "string",
            "example": "Field 'ssn' is required"
          }
        }
      }
    }
  }
}
```

### 401 Unauthorized

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "UnauthorizedResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "Unauthorized"
            ],
            "example": "Unauthorized"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "401-000",
              "401-001",
              "401-002",
              "401-003",
              "401-004",
              "401-005",
              "401-006",
              "401-007"
            ],
            "example": "401-000"
          },
          "message": {
            "type": "string",
            "example": "Client is not authenticated"
          }
        }
      }
    }
  }
}
```

### 403 Bad Request

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "ForbiddenResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "Forbidden"
            ],
            "example": "Forbidden"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "403-000",
              "403-001"
            ],
            "example": "403-000"
          },
          "message": {
            "type": "string",
            "example": "Client does not have access to this resource"
          }
        }
      }
    }
  }
}
```

### 404 Not Found

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "NotFoundResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "NotFound"
            ],
            "example": "NotFound"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "404-000",
              "404-001",
              "404-002"
            ],
            "example": "404-000"
          },
          "message": {
            "type": "string",
            "example": "The requested resource was not found"
          }
        }
      }
    }
  }
}
```

### 429 Too Many Requests. When the rate limit rejects a request, the response carries `Retry-After` and only the `errors` field: no `timestamp`, `moreInfo` or `X-Request-ID`, as the request never reached the API.

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "Retry-After": {
      "description": "Seconds to wait before retrying. Sent when the rate limit rejects a request.",
      "schema": {
        "type": "integer",
        "example": 60
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "TooManyRequestsResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "TooManyRequests"
            ],
            "example": "TooManyRequests"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "429-000"
            ],
            "example": "429-000"
          },
          "message": {
            "type": "string",
            "example": "Too many requests. Please try again later."
          }
        }
      }
    }
  }
}
```

### 500 Internal Server Error

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "InternalServerErrorResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "InternalServerError"
            ],
            "example": "InternalServerError"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "500-000",
              "500-001"
            ],
            "example": "500-000"
          },
          "message": {
            "type": "string",
            "example": "An unexpected internal error occurred"
          }
        }
      }
    }
  }
}
```

### 503 Service Unavailable

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "ServiceUnavailableResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "ServiceUnavailable"
            ],
            "example": "ServiceUnavailable"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "503-000"
            ],
            "example": "503-000"
          },
          "message": {
            "type": "string",
            "example": "An error occurred while interacting with a third party service"
          }
        }
      }
    }
  }
}
```

### 504 Gateway Timeout

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "TimeoutResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "GatewayTimeout"
            ],
            "example": "GatewayTimeout"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "504-000"
            ],
            "example": "504-000"
          },
          "message": {
            "type": "string",
            "example": "The request timed out"
          }
        }
      }
    }
  }
}
```