on 2022 Oct 18 7:52 PM
Hi all,
am using Spartacus 3.2 version and am manually triggering the verify address API for the anonymous users because the very first-time addAddress API is getting failed so I am triggering manually. but it requires an authorization token.below is my code:
'private occEndpoints: OccEndpointsService,
verifyaddress(address: Address):Observable<any> {
const actionAllowed = this.actionAllowed();
let headers = new HttpHeaders({
'Content-Type': 'application/json',
}) let userId;
this.userIdService
.getUserId()
.subscribe((occUserId) => (userId = occUserId))
.unsubscribe()
return this.http.post<any>(
this.occEndpoints.getUrl('addressVerification',{userId,address}, ),{},{}
); }
Below is the response api:
users/anonymous/addresses/verification?lang=en_GB&curr=GBP
Request Method: POST
Request clarification before answering.
User | Count |
---|---|
13 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.