Checkout as guest with shopware 6 store-api - shopware6

I am using the shopware 6 store-api and attempting to convert a cart to an order as a guest. Beforehand, I register the guest using the account/register endpoint with the guest: true parameter.
However, when I try to convert the cart to an order with checkout/order, I receive the error CHECKOUT__CUSTOMER_NOT_LOGGED_IN. I understand that this is because I am a guest, but I cannot login because this requires a password. Is there a way to fix this issue and convert the cart to an order as a guest?

As response from the register-api-call you get a new sw-context-token returned as a header.
You need to use this token from there on for all following api-requests, as it contains all customer related context.

Related

SoftLayer Curl Command Does Not Match UI Output

I've been creating and deleting VMs, and trying to pull their status throughout the processing of the order.
The output is always '{"id":[ID],"statusId":1001}' no matter where in the process the order is.
In the UI, it may say 'Attaching Primary Disk', but it will always output 'Active' and '1001' using the API.
The command used:
curl https://[username]:[apiKey]#api.softlayer.com/rest/v3/Softlayer_Hardware_Server/[serverID].json
Is there a reason why this doesn't work? Is there a solution to getting the status using the API?
About the status you see in UI "Attaching Primary Disk", I think you are talking about the transaction status, to retrieve that information you can use the following methods
For Virtual Guests:
https://softlayer.github.io/reference/services/SoftLayer_Virtual_Guest/getActiveTransaction
https://softlayer.github.io/reference/services/SoftLayer_Virtual_Guest/getActiveTransactions
https://softlayer.github.io/reference/services/SoftLayer_Virtual_Guest/getLastTransaction
For Hardware Servers:
https://softlayer.github.io/reference/services/SoftLayer_Hardware_Server/getActiveTransaction
https://softlayer.github.io/reference/services/SoftLayer_Hardware_Server/getActiveTransactions
https://softlayer.github.io/reference/services/SoftLayer_Hardware_Server/getLastTransaction
When you create a new VM the status will be ¨Active¨ and statusId= 1001 , it means it is in use, when you cancel a VM the status will be ¨Disconnected¨ and statusId= 1006 before to be canceled completely.
After that the status is ¨RESOURCE RESERVE¨ before removing the VM, in this status the VM is not longer listed for users whether through the api o UI.
For more reference you can see the following link:
SoftLayer Virtual Guest host Status list
Try with below curl command to retrieve the VM status:
curl -k "https://[username]:[apiKey]#api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/[vmId]/getObject.json" | python -mjson.tool
Or you can use the following rest api:
Method: GET
https://[username]:[apiKey]#api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/[vmId]/getObject?objectMask=mask[status]

Kraken API AddOrder passes successfully but order is not placed on Kraken

I'm trying Kraken APIs via C# and I managed to call public APIs as well as private APIs for getting the balance and getting open orders. But when I wanted to try an AddOrder API I encountered a problem, the API is executed successfully, but there is no order on Kraken.
Below is the result I get after calling AddOrder API. It seems normal, no errors and all parameters are as I specified them (sell 0.01 btc at 8100.00 usd)
{"error":[],"result":{"descr":{"order":"sell 0.01000000 XBTUSD # limit 8100.0"}}}
But there is no order on Kraken platform. Any idea what I did wrong?
As #Milos found, validate = False will place the order.
From the documentation https://www.kraken.com/features/api#add-standard-order
validate = validate inputs only. do not submit order (optional)
I figured out that parameter validate has to be false!!
By default I set validate to true (which should be desired I guess),
but it does not work.
With validate == false order is placed correctly.
FYI, even if validate == false, basic input arguments check is performed.
When adding an order setting validate=true is a good means of testing. If you want to execute the order, set validate=false.

SoftLayer blockstorage status

I am trying to retrieve SoftLayer Block storages.
I am using the following URL:
https://api.softlayer.com/rest/v3.1/SoftLayer_Account.json?objectMask=mask[iscsiNetworkStorage.volumeStatus]
from which I recieve JSON-data.
What I want to know is, if the ISCSI Storage status is "ACTIVE" or something similar.
Here is the JSON-data which is received:
"capacityGb":20
"volumeStatus":"PROVISION_COMPLETED"
"volumeStatus":{"createDate":"2016-02-02T00:49:19-06:00","message":"Volume Provisioning has completed.","scheduleId":null,"typeId":314,"volumeId":8904469}}
How do I get to know the status?
The property used to know the status of a Network storage volume is volumeStatus , please see: SoftLayer_Network_Storage datatypes.
It seems when ‘volumeStatus’ value is null, the item is “inactive”, otherwise if it has a value (“Volume Provisioning has completed.”), the item is "active".
https://[username]:[apikey]#api.softlayer.com/rest/v3/SoftLayer_Account/getIscsiNetworkStorage?objectMask=mask[username,volumeStatus]
Method: GET
References:
SoftLayer_Account::getIscsiNetworkStorage

Always getting 0 rules when querying products/(id)/rules/count and 204 status from /rules

I'm contacting the API of my client's store on BigCommerce. I've verified the option set has a bunch of rules associated with it (8 product rules).
When I contact the api with
/api/v2/products/181/rules I get a 204 response.
This seems to be an incorrect response.
I tried then contacting
/api/v2/products/181/rules/count
and I get a response of:
{ count:0 }
How do I get a proper representation of these rules, as the API specification describes?
Thanks for any help you can provide. I'm stuck.
The response indicates that there are no rules associated with the product ID in your request. Are you sure that the option set you're referring to has been assigned to the product ID referenced in your request? It is possible that the option set has rules but the product does not have an option set assigned to it.

Unable to get loginForm after addSiteAccount to update credentials

I am using the rest api. After retrieving the login form for a site, I input incorrect login information. I need to now go back and correct the mistake. At first I tried calling GetSiteLoginForm, which isn't allowed since the user is already associated to the site. I then tried to SiteTraversal/getSiteInfo with valid cobSessionToken and &siteFilter.reqSpecfier=16&siteFilter.siteId=643.
The response I get is:
{"popularity":0,"siteId":643,"orgId":520,"defaultDisplayName":"Chase (US)","defaultOrgDisplayName":"Chase Manhattan Bank","contentServiceInfos":[{"contentServiceId":663,"siteId":643,"containerInfo":{"containerName":"bank","assetType":1}},{"contentServiceId":10441,"siteId":643,"containerInfo":{"containerName":"bill_payment","assetType":0}},{"contentServiceId":3163,"siteId":643,"containerInfo":{"containerName":"credits","assetType":2}},{"contentServiceId":3483,"siteId":643,"containerInfo":{"containerName":"stocks","assetType":1}},{"contentServiceId":7100,"siteId":643,"containerInfo":{"containerName":"loans","assetType":2}},{"contentServiceId":3861,"siteId":643,"containerInfo":{"containerName":"mortgage","assetType":2}},{"contentServiceId":12049,"siteId":643,"containerInfo":{"containerName":"miles","assetType":0}}],"enabledContainers":[{"containerName":"bank","assetType":1},{"containerName":"bill_payment","assetType":0},{"containerName":"credits","assetType":2},{"containerName":"stocks","assetType":1},{"containerName":"loans","assetType":2},{"containerName":"mortgage","assetType":2},{"containerName":"miles","assetType":0}],"baseUrl":"http://www.chase.com/","loginForms":[],"isHeld":false,"isCustom":false,"siteSearchVisibility":true}
Note loginForms is empty. How do I get this value? I tried different values of siteFilter.reqSpecfier and always get the same result. Other things I tried were using both the our public and private urls. I duplicated all of this with Dag Site as well.
There is typo in one of the input parameters because of which the parameter is not being recognized by our API’s and hence returning Null LoginForms.
[ siteFilter.reqSpecifier is incorrectly spelled as siteFilter.reqSpecfier ]
Your Excerpt from below email:
cobSessionToken=11182013_0%3A8e8a9caa264e3b26f15c3c9a3ee05680b2edb76272d0a425852a803e6002383b89847d388de38394b4f08efbb881536b496e323ee4e42c9df7dfdcdc8ae10e16&siteFilter.**reqSpecfier**=16&siteFilter.siteId=643
This should be :
cobSessionToken=11182013_0%3A8e8a9caa264e3b26f15c3c9a3ee05680b2edb76272d0a425852a803e6002383b89847d388de38394b4f08efbb881536b496e323ee4e42c9df7dfdcdc8ae10e16&siteFilter.**reqSpecifier**=16&siteFilter.siteId=643
With corrected parameter I was able to query Site 643 and get the loginForm Array. Below is the response with loginForms[]
{"popularity":0
"siteId":643
"orgId":520
"defaultDisplayName":"Chase"
"defaultOrgDisplayName":"Chase Manhattan Bank"
"contentServiceInfos":[{"contentServiceId":663}
{"contentServiceId":10441}
{"contentServiceId":3163}
{"contentServiceId":3483}
{"contentServiceId":7100}
{"contentServiceId":3861}
{"contentServiceId":12049}]
"enabledContainers":[{
"containerName":"bank","assetType":1}
{"containerName":"bill_payment","assetType":0}
{"containerName":"credits","assetType":2}
{"containerName":"stocks","assetType":1}
{"containerName":"loans","assetType":2}
{"containerName":"mortgage","assetType":2}
{"containerName":"miles","assetType":0}]
"baseUrl":"http://www.chase.com/"
"loginForms":[{"conjunctionOp":{"conjuctionOp":1}
"componentList":[
{"valueIdentifier":"LOGIN","valueMask":"LOGIN_FIELD","fieldType":{"typeName":"TEXT"},"size":20,"maxlength":32
"name":"LOGIN","displayName":"User ID","isEditable":true,"isOptional":false,"isEscaped":false,"helpText":"4710","isOptionalMFA":false
"isMFA":false},
{"valueIdentifier":"PASSWORD","valueMask":"LOGIN_FIELD","fieldType":{"typeName":"IF_PASSWORD"},"size":20,"maxlength":40
"name":"PASSWORD","displayName":"Password","isEditable":true,"isOptional":false,"isEscaped":false,"helpText":"11976","isOptionalMFA":false
"isMFA":false}
]
"defaultHelpText":"324"}]
"isHeld":false
"isCustom":false
"siteSearchVisibility":true}
This should resolve your problem
Regards,
Vishal
Yodlee Team
The flow for updating the credentials is listed in this article UpdateCredentials Flow
You can follow the exact steps from the article.
Even when the user is associated to a particular site , you can still pull the login form using getSiteLoginForm and show the form to the user to enter the correct credentials and then pass the login form in updateSiteAccountCredentials and then proceed with the normal refresh flow.