A user may be updated by using the update method
| Method | URL |
| GET | https://api.fairwarningsoftware.com/v1.1.1/user/update |
Below is a list of all fields which can be specified during an update.
| Field | Type | Required | Description |
| user_id | int | YES | The user's unique identification number from the FWS management software. |
| type_id | int | NO | The ID associated with the customer type from the FWS management software. |
| user_verified | bool | NO | Whether the user's email address has been verified. |
| user_receive_texts | bool | NO | Whether the user agrees to receive texts. |
| user_is_preferred_bidder | bool | NO | Indicates whether this user is auto-approved to bid (when applicable). |
| user_is_firearms_dealer | bool | NO | Indicates whether this user is a licensed firearms dealer. |
| user_ffl_number | string | NO | Federal firearms license number. |
| user_class_3_ffl_number | string | NO | Class 3 federal firearms license number. |
| user_ffl_expiration_date | date | NO | Federal firearms license expiration date (YYYY-MM-DD). |
| user_class_3_ffl_expiration_date | date | NO | Class 3 federal firearms license expiration date (YYYY-MM-DD). |
| user_is_tax_exempt | bool | NO | Indicates whether the user is tax exempt. |
| user_tax_id | string | NO | The user's tax exempt tax ID. |
| user_tax_id_expiration_month | int | NO | The user's tax exempt expiration month. |
| user_tax_id_expiration_year | int | NO | The user's tax exempt expiration year. |
| user_tax_id_state | string | NO | The user's tax exempt state. |
| user_email | string | YES | The primary email address, which will also be used as the user's login. |
| user_alt_email | string | NO | An alternate email address fo rthe user. |
| user_pass | string | YES | The user's password, sha1 encoded. |
| user_prefix | string | NO | The user's name prefix. |
| user_fname | string | YES | The user's first name. |
| user_mname | string | NO | The user's middle name. |
| user_lname | string | YES | The user's last name. |
| user_phone | string | NO | The user's primary phone number (XXX-XXX-XXXX). |
| user_alt_phone | string | NO | The user's alternate, or secondary, phone number (XXX-XXX-XXXX). |
| user_cell_phone | string | NO | The user's cell phone for receiving texts. |
| user_fax | string | NO | The user's fax number (XXX-XXX-XXXX). |
| user_phone_country_code | string | NO | The country code for the user's phone number. |
| user_alt_phone_country_code | string | NO | The country code for the user's alt phone number. |
| user_cell_phone_country_code | string | NO | The country code for the user's cell phone number. |
| user_fax_country_code | string | NO | The country code for the user's fax number. |
Additionally, address information can be sent with the user update request using the <addresses/> object (see JSON example), and can contain multiple addresses.
| Field | Type | Required | Description |
| address_id | int | NO | The existing address ID if updating an address. Leave blank to add a new address. |
| address_type | int | YES | The type of address: "1" for billing, "2" for shipping. |
| address_current | bool | NO | Whether this is the current address for the address type specified. (Only one current address per type.) |
| address_street | string | YES | The house number and street name. |
| address_street2 | string | NO | The unit/apartment number and prefix. (Apt 3) |
| address_city | string | YES | The city |
| address_state | string | YES | The state abbreviation |
| address_zip | string | YES | The zip code |
| address_country | string | YES | The 2-digit country code. |
Lastly, maillist preferences can be sent with the user registration request using the <maillists/> object (see JSON example), and can contain multiple mailing list options.
| Field | Type | Required | Description |
| <list_safe_name> | string | YES | The safe name of the mail list being added |
| POST |
| { "user_id": <user_id>, "type_id": <type_id>, "user_is_preferred_bidder": <user_is_preferred_bidder>, "user_is_firearms_dealer" : <user_is_firearms_dealer>, "user_ffl_number" : <user_ffl_number>, "user_class_3_ffl_number" : <user_class_3_ffl_number>, "user_ffl_expiration_date" : <user_ffl_expiration_date>, "user_class_3_ffl_expiration_date" : <user_class_3_ffl_expiration_date>, "user_is_tax_exempt": <user_is_tax_exempt>, "user_tax_id": <user_tax_id>, "user_tax_id_expiration_month": <user_tax_id_expiration_month>, "user_tax_id_expiration_year": <user_tax_id_expiration_year>, "user_tax_id_state": <user_tax_id_state>, "user_email": <user_email>, "user_alt_email": <user_alt_email>, "user_prefix": <user_prefix>, "user_fname": <user_fname>, "user_mname": <user_mname>, "user_lname": <user_lname>, "user_phone": <user_phone>, "user_alt_phone": <user_alt_phone>, "user_fax": <user_fax>, "user_company": <user_company>, "addresses" : [ { "address_id": <address_id>, "address_type": <address_type>, "address_current": <address_current>, "address_street": <address_street>, "address_street2": <address_street2>, "address_city": <address_city>, "address_state": <address_state>, "address_zip": <address_zip>, "address_country": <address_country> }, { "address_type": <address_type>, "address_current": <address_current>, "address_street": <address_street>, "address_street2": <address_street2>, "address_city": <address_city>, "address_state": <address_state>, "address_zip": <address_zip>, "address_country": <address_country> } ], "maillists" : { <list_safe_name> : 1, <list_safe_name> : 1 } } |
| POST |
| <?xml version="1.0"?> <request> <user_id>[user_id]</user_id> <type_id>[type_id]</type_id> <user_is_preferred_bidder>[user_is_preferred_bidder]</user_is_preferred_bidder> <user_is_firearms_dealer>[user_is_firearms_dealer]</user_is_firearms_dealer> <user_ffl_number>[user_ffl_number]</user_ffl_number> <user_class_3_ffl_number>[user_class_3_ffl_number]</user_class_3_ffl_number> <user_ffl_expiration_date>[user_ffl_expiration_date]</user_ffl_expiration_date> <user_class_3_ffl_expiration_date>[user_class_3_ffl_expiration_date]</user_class_3_ffl_expiration_date> <user_is_tax_exempt>[user_is_tax_exempt]</user_is_tax_exempt> <user_tax_id>[user_tax_id]</user_tax_id> <user_tax_id_expiration_month>[user_tax_id_expiration_month]</user_tax_id_expiration_month> <user_tax_id_expiration_year>[user_tax_id_expiration_year]</user_tax_id_expiration_year> <user_tax_id_state>[user_tax_id_state]</user_tax_id_state> <user_email>[user_email]</user_email> <user_alt_email>[user_alt_email]</user_alt_email> <user_prefix>[user_prefix]</user_prefix> <user_fname>[user_fname]</user_fname> <user_mname>[user_mname]</user_mname> <user_lname>[user_lname]</user_lname> <user_phone>[user_phone]</user_phone> <user_alt_phone>[user_alt_phone]</user_alt_phone> <user_fax>[user_fax]</user_fax> <user_company>[user_company]</user_company> </request> |
If successful, the response will contain the user details, or else it will contain an error.
| Status | Response |
| 200 | { "user_id": <user_id>, "user_active": <user_active>, "user_verified": <user_verified>, "user_requires_password_reset": <user_requires_password_reset>, "user_type": <user_type>, "type_id": <type_id>, "user_mailing_lists": <user_mailing_lists>, "user_is_consignor": <user_is_consignor>, "user_is_referrer": <user_is_referrer>, "user_is_account_exec": <user_is_account_exec>, "user_is_preferred_bidder": <user_is_preferred_bidder>, "user_is_tax_exempt": <user_is_tax_exempt>, "user_tax_id": <user_tax_id>, "user_tax_id_expiration_month": <user_tax_id_expiration_month>, "user_tax_id_expiration_year": <user_tax_id_expiration_year>, "user_tax_id_state": <user_tax_id_state>, "user_reg_date": <user_reg_date>, "user_icon": <user_icon>, "user_email": <user_email>, "user_alt_email": <user_alt_email>, "user_prefix": <user_prefix>, "user_fname": <user_fname>, "user_mname": <user_mname>, "user_lname": <user_lname>, "user_phone": <user_phone>, "user_alt_phone": <user_alt_phone>, "user_fax": <user_fax>, "user_company": <user_company> } |
| 401 | {"error":"The API keys provided are invalid."} |
| 403 | {"error":"API keys are missing."} |
| 404 | {"error":"API method ([method]) not found."} |
| 500 | {"error": <custom error>} |
| Status | Response |
| 200 | <?xml version="1.0"?> <response> <user_id>[user_id]</user_id> <user_active>[user_active]</user_active> <user_verified>[user_verified]</user_verified> <user_requires_password_reset>[user_requires_password_reset]</user_requires_password_reset> <user_update_id>[user_update_id]</user_update_id> <user_type>[user_type]</user_type> <type_id>[type_id]</type_id> <user_mailing_lists>[user_mailing_lists]</user_mailing_lists> <user_is_consignor>[user_is_consignor]</user_is_consignor> <user_is_referrer>[user_is_referrer]</user_is_referrer> <user_is_account_exec>[user_is_account_exec]</user_is_account_exec> <user_is_preferred_bidder>[user_is_preferred_bidder]</user_is_preferred_bidder> <user_is_tax_exempt>[user_is_tax_exempt]</user_is_tax_exempt> <user_tax_id>[user_tax_id]</user_tax_id> <user_tax_id_expiration_month>[user_tax_id_expiration_month]</user_tax_id_expiration_month> <user_tax_id_expiration_year>[user_tax_id_expiration_year]</user_tax_id_expiration_year> <user_tax_id_state>[user_tax_id_state]</user_tax_id_state> <user_reg_date>[user_reg_date]</user_reg_date> <user_icon>[user_icon]</user_icon> <user_email>[user_email]</user_email> <user_alt_email>[user_alt_email]</user_alt_email> <user_prefix>[user_prefix]</user_prefix> <user_fname>[user_fname]</user_fname> <user_mname>[user_mname]</user_mname> <user_lname>[user_lname]</user_lname> <user_phone>[user_phone]</user_phone> <user_alt_phone>[user_alt_phone]</user_alt_phone> <user_fax>[user_fax]</user_fax> <user_company>[user_company]</user_company> </response> |
| 401 | <?xml version="1.0"?> <response><error>The API keys provided are invalid</error></response> |
| 403 |
<?xml version="1.0"?> <response><error>API keys are missing.</error></response> |
| 404 |
<?xml version="1.0"?> <response><error>API method ([method]) not found.</error></response> |
| 500 | <?xml version="1.0"?> <response><error>[custom error]</error></response> |
| Field | Type | Description |
| user_id | int | The unique identifier for the user |
| user_active | bool | Whether the user account is active |
| user_verified | bool | Whether the user has verified their email address |
| user_requires_password_resest | bool | Whether the user must reset their password after logging in |
| user_type | int | Signifies whether the user is an admin (1) or not (2) |
| type_id | int | Custom user type associated with this user |
| user_mailing_lists | string | A JSON formatted string with the mailing lists this user is registered for |
| user_is_consignor | bool | Whether the user is a consignor |
| user_is_referrer | bool | Whether the user is a referrer |
| user_is_account_exec | bool | Whether the user is an account executive |
| user_is_preferred_bidder | bool | Whether the user is a preferred bidder |
| user_is_tax_exempt | bool | Whether the user is marked as tax exempt |
| user_tax_id | string | The tax ID for the user |
| user_tax_id_expiration_month | int | The month the tax ID expires |
| user_tax_id_expiration_year | int | The year the tax ID expires |
| user_tax_id_state | string | The state in which the tax ID is registered |
| user_reg_date | datetime | The date and time the user registered their account |
| user_icon | string | The image name for the user icon |
| user_email | string | The user's email address |
| user_alt_email | string | An alternate email address for the user |
| user_prefix | string | The user's name prefix |
| user_fname | string | The user's first name |
| user_mname | string | The user's middle name |
| user_lname | string | The user's last name |
| user_phone | string | The user's phone number |
| user_alt_phone | string | An alternate phone number for the user |
| user_fax | string | The user's fax number |
| user_company | string | The user's company name |