# Update an inquiry (TBA)

`PATCH /fuse/v2/inquiries/{inquiryId}`

Endpoints:

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

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)

  

Partially update an inquiry.

## Parameters

| Name | In | Required | Schema | Description |
| --- | --- | --- | --- | --- |
| `inquiryId` | path | yes | string; example `0679c533-5061-496e-8dc5-df786f04a209` | The unique identifier of the inquiry |

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

```json
[
  {
    "in": "path",
    "name": "inquiryId",
    "required": true,
    "example": "0679c533-5061-496e-8dc5-df786f04a209",
    "schema": {
      "type": "string"
    },
    "description": "The unique identifier of the inquiry"
  }
]
```

## Request body

Required: yes

Content type: `application/json`

```json
{
  "title": "PatchInquiryRequestBody",
  "type": "object",
  "properties": {
    "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."
    },
    "notifications": {
      "type": "array",
      "description": "The notification array allows the consumer of the API to trigger text message and emails to alert the customer",
      "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"
        }
      }
    }
  }
}
```

## 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": "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"
          }
        }
      }
    }
  }
}
```