Guidance required on user id in API

This topic contains 3 replies, has 3 voices, and was last updated by  Nick Henley 4 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #531074

    Nick Henley
    Full Member
    Post count: 29

    Hi there,

    On site two using GD (Yeah!) and getting more ambitious … so new into new territory with the API.

    Q. How do I get the posts for a user using the posts method on the api? What parameter is the user id?

    Could you provide an example? An example url would be great please.

    Note: we are using Ultimate Member for user registrations – if relevant.

    Thanks, Nick

    #531121

    Alex Rollin
    Moderator
    Post count: 27815

    The developers will take a look at your question

    #531127

    Kiran
    Moderator
    Post count: 7069

    Hi Nick,

    To retrieve listings for specific user(s) use author parameter.

    To retrieve listings for one user:
    /wp-json/geodir/v2/places/?author=20

    To retrieve listings for more than one user:
    /wp-json/geodir/v2/places/?author[]=20&author[]=25

    You can find allowed parameter to filter listings in listing endpoint.
    Go to /wp-json/geodir/v2/ page > routes > /geodir/v2/places/ > Endpoints > 0 > args.

    Thanks,
    Kiran

    #531554

    Nick Henley
    Full Member
    Post count: 29

    Excellent. Thanks for the guidance. Will give that a go. Thanks, Nick

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount