Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stockMovements API error #4057

Open
aryangarg794 opened this issue May 23, 2023 · 2 comments
Open

stockMovements API error #4057

aryangarg794 opened this issue May 23, 2023 · 2 comments

Comments

@aryangarg794
Copy link

aryangarg794 commented May 23, 2023

Hi,

I am trying to update the statuses of the stockmovements using the stockMovements API, however when I try to initially get the movements I run into this error:
image
Is there anyone who can tell me how to solve this?

@jmiranda
Copy link
Member

@aryangarg794 Sorry for the delay. Just seeing this. I'll post a response in a little bit. In general, don't hesitate to post usage questions to community.openboxes.com OR jump on our slack openboxes.slack.com for a more immediate response.

@jmiranda
Copy link
Member

jmiranda commented May 25, 2023

Unfortunately, since the API docs are a bit lacking at the moment (swagger docs are on their way!), the best way to explore the API would be to see how the application is using the API.

For example, the Outbound Movement List page demonstrates how it queries for outbound stock movements.
image

Here's the API request

https://demo.openboxes.com/openboxes/api/stockMovements?direction=OUTBOUND&max=10&offset=0&origin=ff808181812576850181beaeaa83017b

API response

{
	"data": [{
		"id": "ff80818181257685018377c7d30906e4",
		"name": "543-ABC-26Sep2022-sdsd",
		"description": "sdsd",
		"statusCode": "CREATED",
		"status": "CREATED",
		"currentStatus": "PENDING",
		"identifier": "033PFH",
		"stockMovementType": "STOCK_MOVEMENT",
		"origin": {
			"id": "ff808181812576850181beaeaa83017b",
			"name": "SAMET-DEPO",
			"locationNumber": "543",
			"locationType": {
				"id": "2",
				"name": "Depot|fr:D",
				"description": "Depot",
				"locationTypeCode": "DEPOT"
			},
			"locationGroup": {
				"id": "c1e34434413773c601413f28ffb70007",
				"name": "INDIA"
			},
			"organizationName": "092-01-11214 Tienda Jeniffer",
			"organizationCode": null,
			"isDepot": true
		},
		"destination": {
			"id": "ff808181812576850181a987408b0147",
			"name": "ABC",
			"locationNumber": null,
			"locationType": {
				"id": "c1e344345cb96055015cd364a74f1455",
				"name": "Warehouse",
				"description": null,
				"locationTypeCode": "DEPOT"
			},
			"locationGroup": {
				"id": "ff808181812576850181a986aac70146",
				"name": "Uppsala"
			},
			"organizationName": "CompanyAB",
			"organizationCode": "COMP"
		},
		"hasManageInventory": true,
		"stocklist": {
			"id": null,
			"name": null
		},
		"order": {
			"id": null,
			"name": null,
			"orderNumber": null
		},
		"replenishmentType": null,
		"dateRequested": "09/26/2022",
		"dateCreated": "09/26/2022",
		"requestedBy": {
			"id": "c1e344347098fcaa0171094a82bd0166",
			"name": "Jessica V",
			"firstName": "Jessica",
			"lastName": "V",
			"email": "***********************",
			"username": "***********************"
		},
		"lineItemCount": 0,
		"requestType": "ADHOC",
		"sourceType": null,
		"isPending": true,
		"isReturn": null,
		"isElectronicType": false
	},

        ... redacted for readability 

        ],
	"totalCount": 21
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants