Support » Plugin: Pods - Custom Content Types and Fields » Pods Api Problems

  • Resolved anti91

    (@anti91)


    1)How can I send multiple posts at once request?

    If I request two objects in this way, I get an error so it doesn’t save it.

    {
    	"status": "publish",
    	"order_id": "100",
    	"total_price": 29.90,
    	"amount": "10"
    },
    {
    	"status": "publish",
    	"order_id": "101",
    	"total_price": 3.90,
    	"amount": "1"
    }

    2) How can I create a unique id?
    If I’m sending the same data again, I don’t want the save it.

    • This topic was modified 1 year, 1 month ago by anti91.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @anti91

    Please give us some more information about what you are trying to do.
    Also, when getting errors, please share the error information!

    Cheers, Jory

    Thread Starter anti91

    (@anti91)

    Thank you for your answer.

    1) Let me ask this way, I hope it will be more understandable.

    Is it possible to posts more than one content with a single request method with Pods?

    actually it doesn’t give an error. When the information I send is more than one content, it creates an empty post as a draft.

    Url: /wp-json/wp/v2/pods
    Method: Posts
    Body: [{pods1},{pods2},{pods3}]

    Requests:

    Response:

    2) I don’t want it to create again the posts I sent before.
    So how can I achieve this?
    Example:
    If “order_id:100” was created before, it should not create the pods with “order_id:100” again.

    • This reply was modified 1 year, 1 month ago by anti91.
    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @anti91

    Sorry for my late reply.
    As far as I know the REST API doesn’t support creating multiple posts at once.
    This is a WordPress limitation, not Pods, so it’s out of scope.

    Please direct your question to the WordPress core forum or create a ticket request on wordpress.org

    Cheers, Jory

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pods Api Problems’ is closed to new replies.