Delete multiple login options
1 min
DELETE
https://api.upstartcommerce.com/v1/user/auth/login-options/batch
Header Parameters
- x-upstart-tenantstringrequiredDescription
Body Parameters
- bodyDeleteLoginOptionRequest[]requiredDescription
- tenantstringrequiredDescription
- domainstringrequiredDescription
- idstring<uuid>requiredExampleDescriptionFormatuuid
Responses
204
207
- DeleteLoginOptionsPartialResponseDescription
- errorsValidationErrorResponse[]requiredDescription
- namestringrequired
- codestringrequired
- detailstring[]required
- reasonstring
400
- ValidationErrorResponseDescription
- namestringrequired
- codestringrequired
- detailstring[]required
- reasonstring
401
- UnauthorizedErrorDescription
- namestringrequired
- codestringrequired
- detailstringrequired
- reasonstring
403
- ForbiddenErrorDescription
- namestringrequired
- codestringrequired
- detailstringrequired
- reasonstring
404
- NotFoundErrorDescription
- namestringrequired
- codestringrequired
- detailstringrequired
- reasonstring
409
- ConflictErrorDescription
- namestringrequired
- codestringrequired
- detailstringrequired
- reasonstring
500
- InternalServerErrorDescription
- namestringrequired
- codestringrequired
- detailstringrequired
- reasonstring
curl
curl --request DELETE \
--url https://api.upstartcommerce.com/v1/user/auth/login-options/batch \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-upstart-tenant: string' \
--data '[
{
"tenant": "",
"domain": "",
"id": "8ad2f2d1-91fc-40ld-8f94-64c787ba009f"
}
]'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-upstart-tenant", "string");
var raw = JSON.stringify([
{
"tenant": "",
"domain": "",
"id": "8ad2f2d1-91fc-40ld-8f94-64c787ba009f"
}
]);
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.upstartcommerce.com/v1/user/auth/login-options/batch", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.upstartcommerce.com/v1/user/auth/login-options/batch")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-upstart-tenant"] = "string"
request.body = JSON.dump([
{
"tenant": "",
"domain": "",
"id": "8ad2f2d1-91fc-40ld-8f94-64c787ba009f"
}
])
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.upstartcommerce.com/v1/user/auth/login-options/batch"
payload = json.dumps([
{
"tenant": "",
"domain": "",
"id": "8ad2f2d1-91fc-40ld-8f94-64c787ba009f"
}
])
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-upstart-tenant': 'string'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
204
// Successfully deleted the login option. No content is returned.
207
// Partial Success. Some login options were deleted successfully, while others failed.
{
"errors": [
{
"name": "",
"code": "",
"detail": [
""
],
"reason": ""
}
]
}400
// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.
{
"name": "",
"code": "",
"detail": [
""
],
"reason": ""
}401
// The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.
{
"name": "",
"code": "",
"detail": "",
"reason": ""
}403
// An update to this resource requires the if-match and if-unmodified-since headers to be sent in order to process the request.
{
"name": "",
"code": "",
"detail": "",
"reason": ""
}404
// Not Found. The login option with the specified ID does not exist.
{
"name": "",
"code": "",
"detail": "",
"reason": ""
}409
// The request conflicts with the current state of the resource.
{
"name": "",
"code": "",
"detail": "",
"reason": ""
}500
// Internal server error. The server encountered an unexpected condition that prevented it from fulfilling the request.
{
"name": "",
"code": "",
"detail": "",
"reason": ""
}